While her students were on summer break, a Hamptons school administrator was hard at work — as a hired actor in a salacious hip-hop music video full of twerking half-naked women, joints of marijuana and binge drinking.

Esther Adler-O’Keefe, an assistant principal at Southampton HS, shocked her small, conservative community with her appearance in the video of “Best Friend,” a song by rapper J.R. and R&B singer Trey Songz.

Adler-O’Keefe says all of six words in the video, which shows the educator and her real-life husband, Brian O’Keefe, leave for the night at what appears to be their mansion.

“Enjoy yourself. Just remember, security’s here,” she says before the couple hurries off in a black SUV.

“Security” turns out to be two scantily clad female guards standing at the front of the home, wearing barely there uniforms that say “Police.” They then strip — and a raunchy pool party with dozens of semi-naked women ensues.

Adler-O’Keefe appears again at the end of the clip, when the couple return home to the trashed house to find a pile of passed out, nearly nude people, along with what appears to be marijuana.

This is not representative of who we are as a district nor of our students and staff. - Scott Farina, superintendent

“Esther was only hired as an actress for her acting scenes,” a spokesperson for J.R. said. “She did her job and then left.”

The superintendent of Southampton Public School District, Scott Farina, released a statement decrying the assistant principal’s hip-hop debut.

“It has recently come to our attention that a member of our administrative staff appeared in a music video,” Farina said. “This is not representative of who we are as a district nor of our students and staff.”

When asked if the principal had been disciplined for her involvement, Farina said the district “cannot legally comment further,” calling it a personnel matter.

Adler-O’Keefe, a 20-year resident of Manorville, started working for the district five years ago, where she’s known as a disciplinarian. She and her husband refused to speak with The Post when approached outside their home Saturday.

The school administrator claimed she was clueless about the video’s content when she accepted the acting gig.

“When I agreed to participate, I was completely unaware of the content, lyrics and title of the video and song,” she said in a statement e-mailed to The Southampton Press.

“Had I known of such content or lyrics, I certainly would not have participated in any fashion. I find the lyrics and content of the music video vulgar, offensive and demeaning.”