Pinto beans being harvested at Pie Town, New Mexico, in the fall of 1940. (Photo courtesy of Library of Congress/Lee Russell)

Beans have been called “the middle child of American cooking, the food we forget we love.”

Yet in a pandemic, they’ve become indispensible to many cooks. No wonder: Beans are cheap, high in protein, easy to store and offer endless flexibility in appetizers, main courses and salads.

You can turn them into rock stars. Or, they can be a surprising secret ingredient that transforms a recipe. Beans are anchors in blogger Deb Perelman’s casserole — a stand in for pasta, to which you add chopped onions, carrots, celery, curly kale, tomato sauce, a splash of red or white wine (suit yourself), coarsely grated mozzarella, and shredded Parmesan. Finish the dish with roughly chopped, fresh flat-leaf parsley.

“I like to think of this as a vegetable-rich (but not overwhelming, should you be trying to entice the hesitant) baked ziti, where the ziti is replaced by giant beans,” Perelman has said of her recipe for “Pizza Beans.”

You can also allow beans to disappear into the background entirely, thus offering your dish a certain, indefinable heft. I did this the other night by adding a can — and then another can — of garbanzo beans to a recipe for Mediterranean Lentil soup. The addition of the garbanzo bridged the gap between chunky carrots and celery and small green lentils, and gave my soup a creamy mouth-feel without me having to haul out the immersion blender and whiz the thing into a puree (my dining companion awarded it a thumbs up).

Yes, beans are great, except for one big drag: They’re yet another of those kitchen staples (along with flour, eggs and butter) that shoppers hoarded early on in lockdown and have become scarce on grocery store shelves.

Yet I’ve been able to cook with beans all along, even though they long ago disappeared from City Market. What’s my secret? For starters, I’ve found bags of dried beans in out-of-the-way places, such as Mountain Market in Ridgway. I was also able to procure some last fall in Dove Creek — famed for its dried beans — at the only store in town, the Dove Creek Superette on U.S. 491. “We still have ’em,” an employee told me Wednesday, “but 10- or 20-pound bags are limited to one per customer.”

You don’t have to travel far to purchase first-class dried beans, though (and I do recommend them over the canned variety, if you’re planning to make them the star of your dish). You don’t even have to leave your couch to purchase amazing dried beans: Rancho Gordo, in California’s Napa Valley, is famed for its heirloom varieties, and while many of those are (alas) sold out, the website reports “many of our beans are in transit, and should arrive mid to late May.” Legumes still available include Black Caviar Lentils, Flageolets, French-Style Green Lentils and the sturdy pinto variety, my most-used bean by far. (Rancho Gordo’s variety receives raves from reviewers — people who have cooked with pintos all their lives — and is my next-to-try.)

We eat pintos at least three nights a week, cooked in a pressure cooker. Typically, I prepare them with salt, and then season them more aggressively once they’re finished cooking with, perhaps, chili powder, Mexican oregano and ground cumin (for a start). Lately, however, I’ve been experimenting with tossing a canned chipotle pepper into the cooking liquid.

I started with one pepper, and worked my way up, until I finally settled on three. Chipotles are smoked jalapenos in a rich, musky sauce called adobo, technically a marinade that originated in Spain that is made with tomato and spices.

I’m a fan of La Costena and Goya canned chipotles; a reviewer in the Austin Chronicle singled out La Morena’s canned variety for its “intense” chipotle flavor and called the San Marcos brand second-best.

Whatever brand you settle on, toss three canned chipotles, plus a generous tablespoon-full or so of sauce, into a pressure cooker with 1.5 pounds of pintos and enough water to cover. Add about a tablespoon of salt.

Cook on high for about 45 minutes; the pintos should be soft, but not mushy. You can always boil them until you achieve the desired texture if you happen to take the lid off the pressure cooker too early. This is an art, not a science, but I do advise specific accompaniments: sharp white Cabot cheddar melted on corn tortillas, topped with a spoonful or two of beans and perhaps tomato or tomatillo salsa. Or, perhaps, a few flecks of barbecued pulled pork.

Or, simply spoon the beans into a bowl and top with shredded cheese. Spicy, smoky, warming, salty and creamy, it’s the ideal one-dish treat for dinnertime, quarantine-time, picnic-time, anytime.