If you take your dog with you, TAKE YOUR DOG WITH YOU.
That means OUT of the car.
That said, a warning is needed: Most people who have dogs know how hot a sealed car in the sun can get. If you do not have a dog yourself, check yourself before you wreck yourself. Facebook fear-mongering can cost you.
Cars in underground garages are not going to get hotter that the outside air temperature.
Dogs and people at rest live in 90-100 degree temperatures for months at a time. Only two of the temperatures on this card are actually dangerous.
If you smash the window out of someone's car, you are liable for vandalism unless it is an extraordinary circumstance and it is well-documented. Expect to lose as much as $1,000 out-of-pocket for window replacement and car rental, and even more if lawyers are involved.
Unless the dog appears very near death, call the police and take no action yourself.