The widow of an NYPD officer pleaded guilty Friday to stealing $410,000 from a charity for slain cops — yet claimed she only took the money to support a grandchild with special needs.

“I wrote these checks, two checks or whatever, and it was considered fraud,” Lorraine Shanley told Manhattan federal court judge Sidney Stein before pleading guilty to various charges, including bank fraud, for stealing the money while acting as a treasurer for Survivors of the Shield.

While prosecutors say Shanley — a so-called “heart widow” because her late hubby died of an on-duty heart attack in 1986 — spent the money on Barbra Streisand tickets and landscaping, she claimed Friday it only went to help family.

“It wasn’t for a new car, a new home, it was for my special needs grandchild,” the 69-year-old told the judge. “In my mind, I thought as a widow, as a benefit, I could do it.”

The judge then asked: “I think what you’re telling me is that you knew it was wrong, you knew it was illegal, but you thought it was justified because of a special needs grandchild?”

She responded “yes.”

Shanley declined comment as she left court, hiding behind oversized-black sunglasses.

As part of the deal she’ll have to cough up nearly $50,000 in forfeiture, in addition to facing a sentence from no jail time to 48 years behind bars.

Sentencing is scheduled for Dec. 19.