Image: Overweight © Image Source, Getty Images

Dieters, watch out: Paying with plastic at the grocery store can make you more likely to load up your cart with doughnuts, ice cream, potato chips and other fattening foods.

Studies have shown that when shoppers pay with credit cards or debit cards, they spend about 40% more on unhealthy foods than those who pay with cash.

The logic may not be very mysterious, but it's definitely worth being aware of if you want to keep both your spending and your weight in check. When you use cash, you usually have to plan the purchase, estimate how much money you'll need, then go to the ATM to withdraw it, says David Just, an associate professor of behavioral economics at Cornell University, who has studied the use of plastic versus cash in food-purchasing decisions.

"But a credit card is there whenever you have the urge for a snack," Just says.

Making those cash calculations also forces you to get your brain churning, Just says. "The act of counting gets you thinking, not just about money, but about the long-term effects of the food," he says, and that makes cash-paying consumers more likely to opt for apples over Apple Jacks. "With cards, you just put the stuff in the basket, walk over and swipe the card. It takes so little thought."

Worried your credit card might be plumping up your other bottom line? Here are five ways to ensure that plastic doesn't derail your diet:

No. 1: Pay for food with cash

Experts say the best thing you can do for your waistline, as well as your wallet, is to buy groceries with cash. "I know plastic is more convenient," says Kalpesh Desai, a professor at Binghamton University who did a study on the grocery-shopping habits of 1,000 single-family households. "But using cash will help you fight the impulse to buy unhealthy foods."

The study, published in 2011 in the Journal of Consumer Research showed shoppers who paid with plastic bought at least 40% more junk foods, such as ice cream, doughnuts, cookies, gum and candy. Yet 86% of consumers in the study paid with plastic on their shopping trips, while only 14% used cash.

Researchers looked at records of the study participants' purchases and payment methods over a six-month period. The method of purchase didn't affect the amount of healthy food -- including meat, vegetables, fruit, baby food and whole grains -- consumers bought. The difference came with the unhealthy stuff. In the study, shoppers who used cards paid attention to prices and knew they'd regret buying foods laden with fat and sugar, but they did it anyway, Desai says. "Unhealthy products have such a strong hold on us that we're unable to resist."

No. 2: Go cash-only for treats

If you prefer using plastic for your groceries, you could take a hybrid approach: Buy only nutritious foods with a card and buy your treats with cash. In a 2009 study led by the Cornell Food and Brand Lab, researchers found that students who paid cash for school lunches, instead of using prepaid debit cards, spent 30% more on healthy items such as low-fat milk, bottled water, fruits and vegetables.

Researchers also saw that students made similar healthy food choices when they were given a debit card that could be used only to purchase foods that were good for them, and were given additional cash they could use to buy anything they wanted, Just says.

No. 3: Limit your funds

If you walk into a store with only $50 in your wallet, you'll probably spend less than if you go in carrying a credit card that has a $5,000 limit, experts say. "People who have credit have more money to spend, so they tend to spend more freely," Just says. You could nix the credit card for your food purchases and instead load up a debit card with a set amount each week or month. Then once the money is gone, it's gone.

"That's a modern incarnation of the old budget trick where people would take cash out and put it in an envelope," Just says. While this method likely wouldn't be as effective as using cash, it's still a way to trick yourself into staying on track with your purchases, experts say.

No. 4: Make a grocery list and stick to it

If you make a grocery list just so you won't forget anything, it probably won't help you in your resolution to avoid unhealthy foods, Just says. Sure, you'll remember the cabbage you need to make your veggie soup, but you might also grab those cream puffs you definitely don't need. But making a list of nutritious items and deciding ahead of time not to buy anything else probably will help a lot, Just says.

"You need to make your decisions before you even walk in the door," says Lisa Galper, a Phoenix psychologist and expert in the psychology of weight loss. That can mean making a grocery list, going over a menu online to decide what to order before you head out for a business lunch or even vowing to order only one pastry before you walk into a doughnut shop, she says.

No. 5: Put a lock on temptation

First it was fast food restaurants. Now vending machines are starting to take credit cards, according to Capital Processing Network. Experts say that consumers need to think ahead about ways to avoid temptation or make it harder for themselves to pull out a card, swipe and munch.

One tactic is to avoid the temptation altogether. For example, Just says that there is a vending machine that takes credit cards right down the hall from his office, so he tried not to walk past it.

Another option? Lock your wallet in your desk drawer, he suggests. Galper recommends locking your purse in your car trunk if driving past fast food restaurants makes you crave a greasy burger. "No one wants to pull into the drive-through, put the car in park, go around to the trunk and get their purse out," Galper says.

For the same reasons that plastic can make it easy for consumers to get into debt, credit and debit cards also can promote unhealthy eating habits, Galper says. "People tend to spend and eat mindlessly, so it's important to be mindful."

Click here to become a fan of MSN Money on Facebook

More from