Hi,
I know of an effective and satisfying way of dealing with this, but first a word of caution. Nobody, even the most ignorant of pet owners, take kindly to interference and you will put yourself in danger if you face these people DON'T DO IT.
I have always used the following method unless the dog is under extreme stress and you feel action must be instant. Move away from the offending car and take down the number, make sure it is not obvious you are watching the car. Write a note along the lines of... Your dog has been in distress for some time due to the heat that has built up in your car. I have phoned the appropriate authority and given them your registration number and the exact place that you have left your vehicle. If you come back to your car before help for your dog arrives please be aware that your car is on file and any further reports of animals being in distress will be treated most seriously.

If after 10 minutes nothing has happened, or sooner if the dogs condition has worsened call the police and ask them to come or agree to forced entry of the vehicle, leave another note to this effect.