Try to find the root of the behavior. Most kids with autism stim because something is bothering them. Maybe give him head phones to block out some of the background noise. Is shaking his head back and forth providing some sort of feedback for him? Kids with autism sometimes have vision issues where shaking his head may help him in some way. Just some thoughts.