Before I head to the check out, I've learned to ask myself re: everything I'm planning to purchase: "Do I really need this?" If not, put it back! "Do I really need this TODAY?" If I don't need it until next week, don't spend the money until I have to. Asking these questions helps me be more mindful about spending.
It's been a gradual process to train myself to live within my means. This is one of the ways I've managed to do it.