He was using the shotgun as it is intended to be used in a felony stop. Every police cruiser is equipped with a shotgun. They are very efficient man stoppers and are more effective than handguns. In addition a shotgun is an intimidating weapon whose mere presence may prevent escalation to violence.
Was he intending on blasting off someone's head?
Yes, if it was necessary to protect himself or his fellow officers. However, police are trained to shoot at the trunk of the body, not the head.
Is it routine for a policeman to point a 12-gauge shotgun around at people at no more than a 10-foot distance when they have been pulled over on the highway?
Yes, if the stop is a "felony stop".
Does that answer your question?