As much of the world practices social distancing to stop the spread of coronavirus, trips to the grocery store are one of the few reasons many of us still are allowed to leave the house.

But the logistics of shopping for groceries can be daunting. What happens if some key items on my shopping list are sold out? How do I keep my distance in a crowded produce aisle? And just how many people have touched that jar of peanut butter or can of beans we brought home?

We talked to infectious disease experts about how to shop for groceries during the coronavirus crisis. Here’s their advice.

Check store policies. Look online for what your store is doing to protect both customers and workers. Many stores now close early to sanitize and offer dedicated shopping hours to customers who are 60 and older. Some stores have installed wipe and hand sanitizer stations and put colored tape on floors to help customers keep their distance at checkout lines. If your store isn’t taking special measures, don’t shop there.

Should I wear a mask and gloves? The Centers for Disease Control and Prevention says people should not wear masks, but many shoppers are wearing masks and gloves anyway. If you choose to wear personal protective equipment (even though health care workers don’t have enough), don’t let it give you a false sense of security. You should still limit trips to the store, avoid touching your face and wash your hands when you get home.

Bring your own wipes and sanitizer. “Most stores are providing hand sanitizer wipes, but I encourage people to bring some of their own — some stores have run out,” said Dr. Elizabeth Eckstrom, professor and chief of geriatrics at Oregon Health & Science University. “When you finish shopping, wipe your hands again and wipe the handles of your car before getting in. I am also wiping my steering wheel, but that might be going overboard.”

Wipe the shopping cart. Even during the best of times, the handle on your shopping cart has more bacteria than most public restrooms. When researchers in 2012 swabbed the handles of 85 shopping carts in Iowa, California, Oregon and Georgia, they found digestive tract bacteria on 73 percent of the carts. If you can, wipe down the cart handle and child seat before you shop. And when you leave, do a good deed and wipe your cart handle for the next shopper.

What if I don’t have wipes? Don’t freak out if you or your store have run out of wipes. “The risk of becoming infected from touching any individual shopping cart is probably very, very low,” said Dr. Daniel Winetsky, infectious diseases fellow at Columbia University Irving Medical Center. “So if wipes are not available, there is no need to abandon your grocery shopping needs. Just try not to touch your face while shopping, and wash your hands or use hand sanitizer after you are done.”

Shop early. Most stores are closing early now to restock and sanitize at night. Try to shop early when stores are cleanest and shelves are full, or shop at off-peak hours when stores are less crowded.

Keep your distance. It’s probably not feasible to keep a six-foot radius at all times in a grocery store, but try for at least three feet, as recommended by the World Health Organization. “The majority of respiratory droplets we produce while breathing and talking fall to the ground — and onto our hands — within a few feet from us, so even a little bit of distance helps,” Dr. Winetsky said.

Limit your trips to the store. Most people don’t have the freezer space or the funds to stock up on two weeks of groceries. But try to get enough food so you don’t have to shop more than once a week. “Every trip to the grocery store is a small exposure event,” said Dr. Robert Amler, dean of New York Medical College School of Health Sciences and Practice and a former chief medical officer for the Centers for Disease Control and Prevention. “You don’t want to do it too often or spend too much time there.”

Have a flexible plan. To minimize your time in the store, have a shopping list that allows for alternatives. Don’t fret if your store has run out of chicken or salmon fillets. Just find a substitute protein — other meats, eggs, tofu, canned tuna, beans — and move on.

Shop for long-lasting foods. Frozen fruits and vegetables are great to have in a pinch, but you can also buy longer-lasting fresh produce. Root vegetables such as potatoes or carrots, as well as squash, onions, celery, apples or oranges, can last for weeks. Taste of Home has a useful guide on how long fruits and vegetables will keep. Regular yogurt, hard cheese and nondairy milk can last a while. Whole-wheat tortillas can be frozen and are a great substitute for sandwich bread, which takes up more space in the freezer.

Don’t hoard. Panic-buying has prompted some people to fight over toilet paper and pilfer from others’ shopping carts. Take what you need for the week; leave food for others. Be reassured that while there may be some empty shelves and temporary shortages of some items, food makers are confident in the supply chain and that we’ll have plenty to eat.

Really, really don’t touch your face. We know it’s hard, but if there ever was a time to not touch your face, it’s in a grocery store filled with people touching everything before you put it in your cart. Sanitize your hands while shopping and after touching high-contact areas like freezer doors. “Absolutely don’t touch your face,» said Dr. Amler. “Don’t touch your mouth, don’t touch your eyes, don’t rub your nose until you’ve been able to sanitize your hands.”

Be kind to your checkout person. Try to maintain a reasonable distance at checkout. If paying with cash, set the money on the counter rather than handing it to the cashier. And given that this is an opportunity for in-person social interaction, try to make the most of it and be friendly. “Try to maintain distance at checkout, but be pleasant and supportive,” Dr. Amler said. “There is a risk to them, being in that environment all the time. You might want to thank them for working during this hectic period.”

Is self-checkout better? Dr. Winetsky noted that at self-checkout, you’re trading an interaction with one person for a self-checkout surface that has been touched by many, many people before you. Either way, wash your hands afterward.

Reusable bags are still OK. A report from Loma Linda University noted that bacteria could persist on and in reusable checkout bags, but this is not a reason to stop using them. Wash and wipe bags when you can, and wash your hands after using them. Offer to pack your own groceries to protect the checkout person from your germs, said Dr. Eckstrom.

Dr. Winetsky agreed that the risk of infection from reusable bags is low, and noted that using them not only helps the environment but can serve as a reminder of the link between the environment and our health. “We should all be bringing reusable grocery bags to reduce our carbon footprint and lower our impact on the environment,” he said. “This may seem like an unrelated idea, but deforestation can play a role in the emergence of pandemic viruses, by bringing humans into closer contact with mammal species from which we were previously very isolated.”

Should I wipe jars and plastic containers when I get home? The majority of transmission of coronavirus is likely from close contact with an infected person. Viral particles do not survive well on paper or cardboard surfaces. And while the virus lasts longer on hard surfaces, contamination from jars and plastic containers is not a big risk. If it makes you feel better, Dr. Amler said, give them a quick wipe as you unpack.

Dr. Winetsky agreed that the risk of contamination from jars, cans or other containers “is infinitesimally small” and that you have to balance risk with anxiety. “I would not do this myself or really recommend it to other people,” he said. “This level of anxiety about sanitation can be harmful in and of itself.”

What about produce? Dr. Eckstrom advised washing your hands after unpacking groceries. And if you’re going to eat raw produce, she recommends washing it with an organic soap for washing vegetables or any natural dish soap.

“I am not wiping everything down, but I am carefully washing my hands after touching these grocery items,” said Dr. Eckstrom. “Cooking does kill the virus, but any fresh produce that is eaten raw should be carefully washed.”

Don’t stress. While it’s smart to take precautions, you also need to take care of your mental health and try to minimize the anxiety of shopping during the pandemic. “Be reasonable with yourself,” Dr. Amler said. “Don’t overly stress. Do the best you can, and most of the time you’re going to come out OK.”