It depends on the child, but my boys would walk "ok" sometimes, dd I refuse to let her try because I know she will be pulling stuff down all the time. I bring a cup, snack and toys in with me to help keep them occupied. They also like to help by putting stuff in the cart and that works half the time to keep them happy. I have left without getting much because we were both tired. The best time to go shopping (for us) is after breakfast. They are full and rested and have played some by that point which makes for a more happy trip.
If all else fails And I NEED to get the shopping done then I give them my phone. Works every.single.time. I get looks from older people but I just keep on going. You do what works to keep your sanity.
I lift my eyes unto the hills, Where does my help come from? My help comes from the Lord, The Maker of Heaven and Earth. And I'll praise You in this storm and I will lift my hands, For You are who You are no matter where I am, And every tear I've cried You hold in Your hand, You never left my side and though my heart is torn, I will praise You in this storm