How do you stop them running? Don't let them!
My ds is 2.3yo and NEVER runs off. He tried once and got strapped in. He threw a fit, so I stopped my shopping, left my full trolley with the very nice lady at customer services explaining that we had to go home because my boy didn't know how to behave in a shop, and would she please pack my groceries back on the shelves. He was mortified and VERY angry. When he calmed down I told him that he could only go shopping with me if he behaved. I did not get cross or raise my voice (which I think annoyed him even more), but I was totally firm and immovable. I would not take him back in when he promised to be good. I told him we would try again another day.
He knows that walking in the supermarket is a privilege. If he tries to run off again, he will get strapped in again. If he throws a tantrum, we will go right home. It is a simple choice. He can walk nicely, or he can get strapped in (sometimes he opts for getting strapped in if he doesn't feel like walking). Any tantrums mean shopping is cut short. There are no other options.
We've had one tantrum only. He now is very well behaved in the shops. Of course I avoid taking him if he is tired or hungry (no point in asking for trouble).
Getting him to "help" by holding (non-breakable) items, makes him enjoy it more. And I always praise him while we are in the shop and when we finish by telling him how proud I am of him being such a good boy in the shop.
Of course he loves running and I make sure that he has lots of time and space to run in appropriate places (fenced in parks etc). But he knows that supermarkets (and other similar places) are not places where we run.