Like everyone else says, IGNORE it! But don't punish (he won't understand at this age). When he calms down on his own, smile, redirect and tell him he's a good boy. You can do this at home or anywhere where he's physically safe.
However, be prepared to deal with a temper tantrum in a STORE or public place. Because it will happen.
Being prepared means being ok with simply removing him from where he's bothering others (no eye contact), putting him somewhere safe and out of the way (such as back in the car, buckling him in). Let him have his tantrum in there while you stand outside the car with your back turned. Then when he's done, smile, redirect, tell him he's a good boy, and resume shopping.
Almost all kids do this and the process of growing out of tantrums can take awhile. However, the alternative is a 100-pound 12-year old who's still doing tantrums and no one wants that! Stay strong!