According to the study's authors,
"When consumers encounter vice products — such as cookies, cakes, and pies — the emotive imagery and associated desire trigger impulsive purchase decisions. Pain of payment can curb the impulsive responses and thus reduce the purchase of such vice products."
The study tracked 1,000 shoppers and their habits over a six-month period. When shoppers paid with credit or debit cards, they were more likely to purchase unhealthy foods. So, if you're looking to smarten your trips to the grocery store, hit the ATM first to avoid temptation in aisle five later.