Get rid of all the junk food in your house. If you have easy access to foods that make you gain weight, you will eat them. It is much less likely you will eat a candy bar if you have to drive all the way to the store to get it.
If you are on a diet, do not go out with friends who like to consume large portions at restaurants. This will allow you to avoid a situation where you would be tempted to consume food that will not help in your journey towards trimming down and looking your best.
Stick to the perimeter when shopping at your local grocery store. Fruits, vegetables, meats, and other fresh deli goods are nutritious and can be found here. The central aisles are generally stocked with packaged desserts, salty snacks and junk food in general that has very little nutrition and lots of calories. The avoidance of these aisles will help fight the temptation to buy these bad foods.