A police sergeant accused of shoplifting drove herself to court in a white Mercedes-Benz on Friday — as it surfaced she once served as an “integrity’’ officer with the NYPD.

Sgt. Eva Pena, 37, was busted in a Yonkers Macy’s on Tuesday night after she was caught on surveillance walking into a dressing room with hundreds of dollars in merchandise and leaving it with the goods nowhere in sight, according to court documents.

She also was filmed taking the sales tags off the clothing — a pair of Tommy Hilfiger pants, a beaded sweater, a Guess lace dress and three other Guess items worth a total of $359 — and stuffing it in her purse, according to an internal NYPD report on her arrest.

Pena, 37, works at PSA 7, a housing unit — where she once served as its assistant “Integrity Control Officer,’’ recommending punishments for underlings who commit infractions, a law-enforcement source told The Post on Friday.

She lasted about six weeks in the post, until the department’s Internal Affairs Bureau ordered her off that job “because of trouble in her own past,’’ the source said. It’s unclear what kind of “trouble’’ she previously was in.

Pena was all smiles at the courthouse Friday when she arrived, apparently unaware of the media. She wore a light-colored long-sleeved top, black pants and black heels and clutched a Louis Vuitton beige bag.

Then she spotted the cameras. Her smile vanished, and she held her head down.

In court, Pena stood beside her private lawyer, Russell B. Smith, and said nothing as he entered the “not guilty” plea to petit larceny charges on her behalf.

The officer was released on her own recognizance pending her next court appearance Sept. 25.

“She is adamant that she did not do it. She has an excellent record with the [Police] department,” Smith told reporters afterward.

Pena refused to answer questions as she drove off in her Mercedes.

Pena, a cop in Bronx public housing, made $107,809 in 2018, according to the nonprofit Empire Center.