It depends on whether one honestly believes that the supermarket would consent to them eating a snack before paying for it.
If there is no consent, either explicit or implied, then it is theft as no contract has been performed or fulfilled so ownership hasn't transferred, as follows:
Theft is defined by section 1Theft Act 1968 as:
(1) A person is guilty of theft if he dishonestly appropriates property belonging to another with the intention of permanently depriving the other of it; and “thief” and “steal” shall be construed accordingly.
The two elements relevant here are "dishonestly" and "intention of permanently depriving".
Section 2 offers three defences to being dishonest, with this being the only one applicable here:
(1) A person’s appropriation of property belonging to another is not to be regarded as dishonest—
- (b) if he appropriates the property in the belief that he would have the other’s consent if the other knew of the appropriation and the circumstances of it...
The definition of intention to permanently deprive may be found at section 6:
(1) A person appropriating property belonging to another without meaning the other permanently to lose the thing itself is nevertheless to be regarded as having the intention of permanently depriving the other of it if his intention is to treat the thing as his own to dispose of regardless of the other’s rights...
See this article by News Shopper that explains it in a much better way than I could without me commiting plagiarism:
Buying a product at the till is what transfers the ownership from the product belonging to the shopkeeper, to it belonging to you.
And only when that sale is complete do you have the legal right to consume or use it.
If you eat the chocolate before you legally own it, you are permanently depriving the owner of his right to the product – he can no longer refuse you the sale or take the item off the shelves.