Wiltshire Police released video of the rescue in a warning to drivers against leaving animals in cars on hot days.
PC Martyn Powell said he had been called in the south of the county to reports of a dog left in a car for a number of hours last week.
"Although the windows were opened a slightly, the dog didn’t have any water and had become tangled on their lead restricting their movement within the vehicle. I was concerned for the welfare of the dog and I took the decision to smash the window of the car to free the dog," he said.
The "remorseful" owner was said to have agreed to donate £50 to the Dog's Trust.
PC Powell said on the day of the rescue it was 21C, with the temperature inside the car likely to be over 40C: "Prolonged exposure to this temperature can be dangerous to people but more so to our pets. Please make sure that you consider your pet's welfare."