In some supermarket trolleys, I found it "the trolley will stop suddenly if you try to leave the facility".
How it is done? I noticed some trolleys have something attached to one of their wheels. But usually that makes them difficult to push even inside the stores!