AFTER years of living high on the hog, “The Real Housewives of New Jersey” stars Teresa and Joe Giudice were finally exposed as phonies in a string of federal fraud indictments.

And now a team of ENQUIRER reporters has gone behind the scenes to uncover the inside story of how the free-spending couple could lose everything.

Sources say the Giudices’ headline-making fall from grace has been coming for years, as they blew big bucks on a flashy lifestyle that was noth­ing but smoke and mirrors.

“Image is everything, especially where Te­resa’s concerned,” said a former bit player on the drama-filled Bravo series. “For years, she and Joe lived well above their means to maintain an illusion of opulence. When they landed on ‘Housewives,’ they ramped up the glitz factor even more.

“But as their legal problems show, it’s been a total sham – a house of cards that’s come down in spectacular fashion.”

On July 29, the high –flying reality stars found that reality bites big-time.

That’s when Teresa, 41, and Joe, 43, were slapped with a 39-count federal indictment charging them with conspiracy to commit mail and wire fraud, bank fraud, making false state­ments on loan applications and bankruptcy fraud. Joe also is accused of failing to file tax returns for 2004 through 2008.

If convicted on all charges, each could face a maximum sentence of 50 years in prison, along with more than $1.5 million in fines. What’s more, Joe – who was born in Italy and is not an American citizen – could be deported.

“The threat of deportation is what really has Joe scared and, knowing the kind of guy he is, I suspect he’ll turn on Teresa,” a source close to the couple told The ENQUIRER. “After all, she’s the bigger fish in the family, and prosecu­tors want to bring her down more than Joe to set an example.

“In the past, Joe has taken the rap for Tere­sa during their civil lawsuits, but this case is a whole other ball game and I think Joe will do whatever it takes, even if it means ratting out his wife to save his own hide. At the moment, they appear united and supportive of each other, but that could change in an instant.”

Joe supported the family for years by running everything from a pizza joint to a stucco com­pany. But since landing her reality gig, Teresa has been the family breadwinner thanks to her TV salary, cookbooks and a specialty food line, Skinny Italian.

The couple’s legal problems date back to October 2009, when they filed for Chapter 7 bankruptcy protection, listing liabilities of more than $8 million!

That staggering sum included $2.2 million in home mortgages on their main residence, a gaudy 12,000-square-foot “McMansion” in Towaco, N.J., and a small place on the Jersey shore.

They also stiffed a fertility clinic for nearly $12,000 and owed $104,000 on eight credit cards, including $19,700 at Blooming­dale’s, Neiman Marcus and Nordstrom.

But the couple’s dire cash flow issues had yet to be revealed when Teresa set the tone for her over-the-top spending in “RHONJ’s” premiere episode in May 2009, shelling out a staggering $120,000 at a furniture store and paying the tab with a wad of rolled-up $100 bills.

“I hear the economy’s crashing,” she said matter-of-factly. “That’s why I pay cash.”

Teresa also splashed $10,000 for breast im­plants, and court documents reveal that just days after the couple filed for bankruptcy, she dropped another $60,000 on even more home furnishings.

But insiders say Teresa could have used the money, which was an advance for her cookbook “Skinny Italian,” to pay off creditors.

“Teresa is totally out of control when it comes to money matters,” said a pal. “And Joe also spends with reckless aban­don. They seem unable to control themselves!”

As part of the bankruptcy suit, the trustee responsible for distributing their assets to credi­tors scheduled a public auction at their Towaco mansion in October 2010. The auction was can­celed so the couple’s possessions could be sold privately, but it revealed their home was stuffed with luxury goodies, including a suit of armor, a Schaefer & Sons Grand piano, a 48-inch Wolf stainless steel gas range and an antique-style pool table.

The couple also spent lavishly on birthday parties for their daughters – Gia, 12, Gabriella, 8, Milania, 7, and Audriana, 3. They booked en­tire clubs for the bashes, splurging on catered food, custom cakes and booze for adult revelers.

The Giudices also travel like royalty. On July 21, at their Jersey shore getaway, The ENQUIRER observed Teresa and Joe tooling around in a Mercedes SUV. And in 2010, Joe admitted to owing $60,000 on their leased $140,000 Maserati.

After their indictment, the Giudices were released on $500,000 bail each. Neither filed a plea, and a trial date is expected to be set at their Aug. 14 arraignment.

Meanwhile, sources say Teresa’s fellow TV house­wives – Jacqueline Laurita, Caroline Manzo, her sister-in-law Melissa Gorga, Kathy Wakile and former co-star Danielle Staub – could be called to testify at the Giudices’ trial.

“The women may have first-hand knowledge of Teresa’s financial dealings, before and after the show premiered,” said an insider.

“Prosecutors could also subpoena ‘RHONJ’ foot­age, and producers who might have information.”

The pal added: “Until these legal problems get resolved, Teresa’s goose is definitely cooked. It’s doubtful that her cookbook publisher or any oth­er company she’s involved with would want to continue their relationship unless she’s found not guilty.”

A source close to the couple added: “It looks like Joe and Teresa could be wiped out financially – and land in the poor house after serving time in the big house.”