
Christine,
The contract that makes a purchase involves.
1) Invitation to treat ( generally a promotional sign, goods on special)
2) The offer ( which is what you the buyer does when you offer the money for the item If you thought the item was say £10 that would be your offer.)
3) The acceptance ( the shop keeper does on behave of the owner but they do not have to accept the £10 )
The contract is not completed or legal until the acceptance has been done.
People get the offer and acceptance muddled up thinking the offer is made by the shop and the acceptance is made by the buyer but that is 100% not the case in legal definition.
SO in a short answer they don't have to sell you a think. ;-)
Trading standards cannot force a shop to sell something but it can be reported to them. They generally get a telling off BUT if it was a regular thing they can be prosectuted by them.
EDITED to add that most shops do it out of good will and customer services there is still a few who don't