Dogs do not have any sweat glands , nor do they have a great amount of blood vessels on their skin.
By shaving your dog, you actually predispose them to sunburn, and heat exhaustion, or even heat stroke.
If you keep your dog well combed , brushed, mat free, he will have a better circulation of air through his hair, which acts as a cooling effect.
I shave on some of my dogs their bellies, groin, and armpits, but even that only to the minimal.
We have "bugs" out here, like bees, ants, stinging flies. All those bugs have it much easier to sting a shaved dog than one with plenty of hair.
Keep your friend well groomed, have plenty of fresh water, and don't shave your dog.