There's no law against walking into a store or restaurant barefoot.
It's just policy of some stores and and restaurants as to whether you're allowed into the store or restaurant barefoot.
I've seen some people walking into Walmart before barefoot and nobody said anything to them or stopped them but the worst that will happen is they ask you to leave the store and come back with shoes on.