Well then, if child wants to play with toy in shop (as long as it isn't inextricably in packaging, which is another problem to be worked out, perhaps with the help of the shop assistants) then I would stay in shop for as long as child wants to be there playing with toy.
The details of ownership of the toy are then (as Julia Roberts not-quite said) just geography.
Repeat after me...
ALWAYS PACK YOUR BOOK OR ALTERNATIVE MEANS OF ENTERTAINING YOURSELF BEFORE EMBARKING ON ANY EXPEDITION
It can really help to leave the watch at home, and make it possible, as far as packaging makes it possible, for child to play with toys/other interesting objects in the store for as long as they want to. Shall we go to playgroup or shall we go to Walmart today?
Often, a child will have finished with object way before the check out counter. In fact, games of putting umpteen bags of sugar in the trolley and then reshelving them is also tremendous fun (well, maybe less thrilling for a 14 year old than a 3 year old, heh)
There is no law which says that something in the trolley has to be bought. It just shows that these are the objects which have caught your eyes so far.
(I'm not saying that if child really wants to buy the Neutron soup, you should put it in the trolley and then lie to them about having left it behind. What I mean is, the moment of putting something in the trolley or even putting it on the check out counter does not represent an irrevocable decision)