Conventional wisdom says that if you go to the grocery store when you're hungry, you'll come home with more cookies than kale.

Recent research in the journal NeuroImage and published on Science Direct suggests there's some science to back up that theory. Researchers studied the effects that being hungry had on the brain responses of 122, healthy-weighted people between the ages of 8 and 75 (17 children; 38 teens; 36 adults; 31 elderly).

The participants were shown images of high- and low-calorie foods, as well as images of non-food items. Some of the participants had fasted and were hungry; some of them had eaten and were sated. For the study, researchers looked at participants' brain responses to the images while the participants were being scanned using fMRI or functional magnetic resonance imaging.

brain activation This is your hungry brain when it looks at photos of cookies. (Photo: adike/Shutterstock)

Although the degree varied, across all age groups, participants' brains showed greater activation in the bilateral dorsomedial and in the right dorsolateral prefrontal cortex when they were shown images of higher-calorie food vs. lower-calorie foods or non-food items.

Researchers concluded that participants who viewed the high-calorie food images in a hungry state "might reflect increased inhibitory control" when responding to the foods. In other words, when we're hungry, our inhibitions lessen and we have more difficulty resisting high-calorie foods like cheeseburgers or cookies.

Understanding how the brain responds to food cues can help explain why some people make unhealthy food choices or why some people overeat. The researchers wanted to study how food cues affect hungry participants and full participants over various life stages in life and found that we all want to eat higher-calorie foods when we're hungry. They may not have intended to link their findings to the conventional wisdom that says no food shopping while hungry, but it seems a link does exist.

Every food item in the grocery store is a food cue. When we shop when we're hungry, the higher-calorie foods activate our brain more than the lower-calorie foods, making the higher-calorie foods more appealing. So, if you want to restrain yourself from filling your basket with foods that aren't on your grocery list, heed the science — and the common wisdom — and don't go grocery shopping when you're hungry.

Robin Shreeves ( @rshreeves ) focuses on food from a family perspective from her home base in New Jersey.