The only thing that worked with my DS at that age was time out.

Straight to his room if we were at home.

If we were out then it was back to the car and strapped into the carseat. I'd tell him I was leaving him there and walk off and hide just out of his sight for 5 mins. It took a couple of times (he was shocked the first time) but it did help heaps and I only had to threaten and he'd be much better. You need to be prepared to go home if you have to as well to reinforce that you will follow through with your threats and when you get home put him in his room.