Have a budget
When you go to the store, you have know exactly how much you can spend. Then try to stick within that limit. If you don’t know how much you can spend, you’ll certainly spend too much.
Buy in bulk when it makes sense
If you can save money, over the course of a month or two, by buying in bulk, plan to do so. But be sure that you’re going to use all of it before it gets bad — it isn’t cheaper to buy in bulk if you don’t use it.