First things first, you need to have an envelope for each category in your budget. Have one envelope for everything in your budget!
Once your lovely paycheck hits the bank, be sure to head to the bank and retrieve your cash, so that you can allocate it to the proper envelope.
When it comes time to pay your bills or buy groceries, it is important that you use only the money from the proper envelope.
If you find yourself with extra money after shopping at the grocery store, it does not mean that you have to go back in and buy more food.