Four-star chef Eric Ripert had $50 to spend at the Mexican-flavored Tehuitzingo Deli. With some tips he learned from chef Alfredo Ayala, he plans to cook a Mexican meal with Puerto Rican influences. Photo: TAMARA BECKWITH

A grocery gourmet, chef John DeLucie learned you can still make a tasty pasta dish with Spam and other cheap ingredients. (TAMARA BECKWITH)

Egads! You’ve got guests coming over tonight for a holiday soiree. Sure, a perfect cook would have browsed the green market well ahead of time, but you’ve been swamped — and oops, you’re broke! So, what do you do?

We challenged three celebrity chefs to whip up a holiday meal using just what’s available at the local bodega. With a $50 budget, can they make an appetizer and an entree to feed six to eight guests? Feeling generous, we granted them the following four bonus pantry items: salt, pepper, butter and olive oil. Now, on to the Bodega Challenge!

Eric Ripert, chef/co-owner, Le Bernardin, author, “Avec Eric” cookbook Ripert may be renowned for his exquisite French seafood, but the four-star chef is a perfectionist even when shopping at a bodega. “The challenge was to find the right market,” says Ripert. He ultimately chooses Tehuitzingo Deli & Grocery (695 10th Ave.; 212-397-5956) in Hell’s Kitchen — a tiny bodega offering Mexican specialty items, lots of fresh produce and a small taqueria in the back (Ripert is a big fan of the $2.50 pork carnitas tacos). “You should be inspired by the culture of the store,” says the down-to-earth epicure, who decides to put together a Mexican meal with some Puerto Rican influences. “My wife is Puerto Rican,” he explains, adding that celebrated Puerto Rican chef Alfredo Ayala taught him how to make rice and beans. “A lot of Latino people buy most of their food [at bodegas like this]. I think it’s as good as anything.”

* Surprise swap: To Ripert’s dismay, Tehuitzingo is out of rice! “That is a disappointment,” he sighs. Instead, for his pinto beans and rice recipe, he substitutes three bags of La Perla small elbow pasta (60 cents each). “The tiny pasta is very French,” he observes. It also winds up being a perfectly acceptable swap.

* Total: At $43.90, Ripert’s ingredients ring up well under budget. “I could get a Corona!” he jokes. Instead, he buys two pieces of flan ($5.50), which he manages to elegantly carve into eight slices.

Chow bella

Donatella Arpaia, chef/owner, Donatella and Mia Dona, co-owner, Kefi

“It’s amazing what one finds in a bodega in New York,” says Arpaia as she browses the shelves at the cash-only U.N. Gourmet Plaza (361 E. 49th St.; 212-688-0910). “I’m surprised by all the products they have.” It may not be Whole Foods or Amish Market, but there’s enough oddball variety to tempt her to try a fancy feast. “To go high-end in a bodega is a little scary, but I wanted to give it a whirl,” she says. Still, when it comes to desserts, she sticks with a no-fail plan — Rice Krispies treats with a twist.

John DeLucie, chef/co-owner, The Lion and Miami’s new The Royal at The Raleigh Hotel

Despite its name, the Ninth Street Farmers Market (64 W. Ninth St.; 212-505-7194) doesn’t have many fresh ingredients. “There’s a lot of junk here!” exclaims DeLucie as he does a quick pass through the aisles to get his creative juices flowing. He scans the proteins — copious Spam and tuna. Hmm. The produce is even worse — there aren’t even fresh onions and garlic! Thankfully, there are a few imported Italian products — so DeLucie decides on a simple Italian meal.

* Surprise Swaps: The bodega doesn’t have bacon, so DeLucie decides to “do it up with regular all-out, no-joke Spam” (two cans at $4.50 each). “I’ve never had Spam in my life!” he laughs. Though it lacks bacon’s smoky quality, it’s passable in carbonara — though so salty Spam Lite would have been better. Too bad the same can’t be said for the Cheese Unlimited pregrated Parm ($2.97). “It’s certainly not Reggiano,” he observes. Meanwhile, with no fresh garlic or Italian bread for the soup, DeLucie opts for three packages of Alessi garlic breadsticks ($2.49 each). Unfortunately, the “phony garlic flavor” is “dreadful.” “The lesson is, don’t take good ingredients for granted,” he says.

* Total: Packaged food costs money! When his bill totals $51.54, DeLucie returns one of four cans of tomatoes and finds a smaller container of cheese, lopping off $4.28. In exchange, he picks up almonds ($1.50) and a lemon (60 cents) for a lemon-almond pesto garnish for the pasta, for a final total of $49.36.