A new study reveals that foodborne illness can be an issue outside of the supermarket, as well.
Credit: Getty: Sascha Kilmer

People love to shop at farmers markets—in-season produce is fresh and sourced locally, and you can often find foods that are tastier or harder to get at a local supermarket or grocery store chain.

But the halo enjoyed by farmers' markets means that it's easy to forget about the issue of food safety. Just because you're shopping outside of a traditional grocery store doesn't mean that all food is immediately safe for consumption.

New research suggests that bacteria capable of causing widespread illness can be found on many foods at these markets. A team of researchers at Pennsylvania State University studied the behaviors of local vendors at more than 40 Pennsylvania farmers' markets, finding that many failed to follow basic sanitary procedures when it came to preparing items for sale. Their findings were published in the November issue of Food Protection Trends, according to Penn State's official release.

There's a good chance that the farmers selling items at your local market say they're taking proper safety precautions when handling their merchandise—but this new bit of research finds discrepancies between what farmers should be doing and what they're actually doing when selling meat or produce.

One glaring example is the use of protective gloves when handling anything raw—fewer than a quarter of farmers actually used them at their stands, and the study found that half of those who did use gloves used them improperly (read: not changing their gloves after handling raw meat or money).

"The vendors believe they are doing a good job, when in reality they are not. We are not sure why there were such discrepancies," says Catherine Cutter, a professor of food science at Penn State's College of Agricultural Sciences and the lead author behind the study.

More on how you can keep your kitchen safe from foodborne illness:

Credit: Getty: Hero Images

Poor hygiene, alongside improper handling and contamination at farm sites, may be the reason why researchers found multiple sources of foodborne bacteria in food samples at these farmer's markets. According to the study, E. coli was present in 40 percent of beef samples, 18 percent of pork samples, in over 33 percent of kale and lettuce samples and in 17 percent of spinach samples.

Listeria, another potentially deadly source of contamination, was also routinely found in random samples—in 7 percent of spinach, 4 percent of lettuce, and in 8 percent of beef.

More often than not, choosing to thoroughly cook your purchases from the farmer's market will eliminate most risks—but when it comes to produce and other raw items, shoppers should go about their thorough preparation, cleanings, and other safety precautions just like they do with any other grocery item.

Using the research presented, there are a few simple ways you can avoid foodborne illness when shopping at the farmer's market. Keep these five tips in mind the next time you find fresh produce and other groceries at your local market.

1) Ask Your Vendors About Their Safety Procedures

The simplest way to tell if produce and other perishable items are okay for consumption is confronting the issue head on. It doesn't hurt to ask your local vendor what they're doing to make sure items are safe to consumption—what kind of procedures do they practice at their farms and in transportation? If they sell particularly risky items, like raw poultry or beef, how do they handle the product while at the market? This is also true for ready-to-eat foods, ranging from baked bread to desserts or even heat-and-serve items, because you don't know which temperatures they used in production to properly kill off harmful bacteria.

Credit: Edmund Lowe Photography

When in doubt, ask! You can learn a lot from speaking openly about the topic… which also gives you a chance to see firsthand if vendors use proper sanitary tools like gloves.

2) Don't Purchase Raw Dairy

Credit: Danny Kim for TIME

Sales of Raw milk have been banned in 20 states—but many states still allow it to be sold directly by a producer—which is to say a farmer. Still, you may want to indulge in this trend at your own risk. The Food and Drug Administration has identified raw milk as the most dangerous raw-food product available to shoppers, and many people have fallen seriously ill after drinking it. Regardless of the precautions taken by vendors, including bacteria tests, there's a chance you'll fall ill after consuming raw dairy—this can also be true for unpasteurized juice and cider.

3) Save Perishable Items For Last

Credit: Getty: ThitareeSarmkasat

Buy anything that needs to be refrigerated—beef, poultry, eggs, and dairy especially—at the end of your visit so that you can reduce the risk of spoiling on the way home. In the summer and warmer months, it can take only 30 minutes for a car's interior to reach a whopping 140 degrees Fahrenheit, and your fresh purchases will spoil at high temperatures like this. Bring a cooler or insulated shopping bag and drive home immediately afterwards.

4) Wash Your Produce and Perishables Thoroughly

Washing your raw fruits and vegetables before consuming them is essential for safety—and you should wash before loading your purchases into your kitchen, given that bacteria can transfer from surface to surface (including cutting boards and plates).

Credit: Adobe: Chris

Keep in mind that while running your purchases under tap water can be an effective method for washing, previous research shows that distilled water is actually more effective for sanitization of illness-causing bacteria on raw produce. Make sure to rinse off herbs and other spices, too—a 2014 University of Washington study shows that fresh herbs can play host to bacteria like E. coli as well.

If you're not going to cook or eat produce right away, dry them after you rinse—moisture can encourage bacteria to grow at home.

5) Use a Thermometer

Investing in a meat thermometer that can help you cook your meats to proper temperature will also help you avoid disease-causing bugs. Whole cuts of beef should be cooked to 145° F, ground beef to 160° F, and poultry to 165° F.

Credit: Photo: Target

The bottom line: This research isn't suggesting that you stop shopping at the farmer's market. Not all vendors are the same, and many vendors are practicing safe handling techniques—but it's just a good reminder to use best judgement and proper food safety procedures with all foods, regardless of where it was sourced.