It's not illegal no, even though supermarkets are 'private property' with public use. But it is illegal to stay on the property if the owners have seen you taking photos and have asked you to leave.
I do this sometimes for ideas for future shop-fits and if the staff see you taking photos, you are more than likely to be asked to leave the store as they won't want competitors stealing ideas for layouts/ design concepts.
Shoot away, obviously trying not to get anyone in the photo (respect their personal space) - just get the fixtures you need in the shot, but leave immediately if requested.
We sometimes go in as a team of two - one person stands in front of the light fitting/ display cabinet that we are looking into and 'poses' for a funny picture and we giggle at the picture - this looks less like a competitor going round.
If it is something of interest to you and you are not in the trade to get ideas, you could approach the staff and ask them if it's ok - but they will most likely say no if you make them aware of your presence, in case you are indeed a competitor.
I hope this helps.