That is a valid question, though we’ll probably will never get an answer to that.
My first thought was that the curse somehow magically transported everything to the stores (magic can’t make food, only transform it), but where would it come from? I doubt it would be just stolen from somewhere …
Maybe – based on the theory of FTL being under Storybrooke – the ingredients and metal, etc are all taken from FTL, transformed to modern products and placed into the shops or whoever is in charge of delivery. 🙂