“She’s going to play Courteney’s shrink named Bonnie,” the show’s executive producer, Bill Lawrence, told EW. “Kind of a get-too-involved-in-her-life-type of therapist. Those guys are so close in real life they kind of do that for each other anyway.”

Since “Friends” ended in 2004, Aniston also teamed up with Cox on the FX series “Dirt” in 2007.

Lovelorn Celebs: Jennifer Aniston

Cox wanted “Cougar Town” to get established before bringing in Aniston, Lawrence told EW.

Over the course of its first season, the program went from being "a typical TV show trying to find itself to something that I’m really proud of and like and think is really funny,” Lawrence said.

For Aniston, the guest spot could prove a welcome distraction in the wake of paltry opening weekend box office receipts for her latest feature film.

Lovelorn Celebs: John Mayer Edition

“We’re very intentionally implying that it’s a therapist Courteney has been using for a while, and we’re certainly not going to make it like they’ll never see each other again,” he told EW. “So I’m crossing my fingers that if she has a good time it’ll happen again.”