I can honestly say that my children very rarely had tantrums. My belief is that tantrums are the result of children not being listened to, or not being understood, or not having their needs met.
For instance, why would a small child be happy stuck in a shopping trolley going round a huge supermarket?
When mine were very little, I did a big weekly shop of an evening, while their dad put them to bed. Far more civilised for everyone! When they were each a little older, and I felt they could interact with the shopping experience I would write a few items of shopping on a separate list, and it was their responsibility to chose them. (Obviously items within their reach and safe to get. Something like 4 apples also added practice with counting.)
Mine also knew that when I said 'No' I meant 'No', and they would get a rational (brief) explanation as to why. It would, if at all possible, be qualified with a promise to meet their request at a later, more appropriate, time.
On the odd occasion that a tantrum was thrown I usually found it very amusing, and laughter soon took the wind out of the tantrum-throwers sails