I find that am not nearly as tempted by the chips and ice cream at the grocery store if I make detailed menus in my Nutrition Tracker while I am creating my grocery list.
I plan the next 7 days down to the last calorie. When I go to the store, I know that if I add a treat, something on my list must go to keep within my calorie limit. I remind myself that trading junk food for a healthy item does not help me reach my goal.
Occasionally I do decide on the junk food trade, but now it is a very conscious decision.