DHW - when my DS threw a screaming tantrum in the shop, I warned him then after getting no result, I left my (full) trolley with the customer services lady. Told her to please return my groceries to the right places, as I could not finish my shopping as DS did not know how to behave in the shop. Told DS (very calmly) that I would not tolerate that behaviour and we had to go home until he could be "happy" in the shop. He was stunned, then FURIOUS, then embaressed, then very apologetic.
During the FURIOUS stage I carried him screaming and yelling through the shopping centre, strapped him into the car and he calmed down on the way home, begging to be taken back. I refused and said I would only go back with him when he as a happy boy. Bless his heart, he did try smiling and asking nicely, but I told him it was too late. He needed to behave the whole time we were in the shop.
I have not had the problem since, but he knows that if we are out and he misbehaives he is going straight home (and into time out where there are no toys). He knows I am not kidding.
If we are out for dinner and he misbehaives, he sits in his car seat in the car with an adult sitting with him (not talking to him). We've only had to do this twice, and now he is a real pleasure in the restaurant.
Of course, I try not to take him out if he is overtired or not feeling well. Also, I would not do this if he was just a bit stroppy or a bit "overenthusiastic" - but when it became out of control then this really worked for me.
Also, if I ever see another kid throwing a tantrum when I am out, I draw it to DS's attention and tell him "that's not very nice is it?" - and he shakes his head and says "no! ugly!". That at least gives him a point of reference to know what he looks like in a similar situation.
I've no doubt he'll be pushing the boundaries again. But DH and I are totally united on this issue, and DS knows it. We tell him that it is his choice. "You choose. If you want to stay out in the shops with mommy, you need to be a happy boy. You can yell if you want to, but then I'm taking you home".
My real fear was that if I couldn't set a boundary now and stick to it, what on earth would I do when he is a teenager!