Jennifer Lopez Jennifer Lopez

Jennifer Lopez will be giving relationship advice — on the small screen.

The multihyphenate will guest-star on a March episode of How I Met Your Mother as Anita Appleby, a no-nonsense author of self-help books that teach women how to mold men into "relationship machines" through the power of denial. After Robin informs Anita of Barney's womanizing ways, Anita sets out to "break" him.

How I Met Your Mother gets a sixth season

"We couldn't be more excited about Jennifer Lopez joining us on How I Met Your Mother

," Carter Bays, executive producer and co-creator, said. "We're looking forward to a week of revealing outfits and sexy dance moves the likes of which this show hasn't seen since Regis Philbin guest starred."

Carrie Underwood to guest-star on How I Met Your Mother

Lopez, 40, is the latest high-profile guest star for the sitcom, which was recently renewed for a sixth season. Tim Gunn, Amanda Peet, Stacy Keibler, Rachel Bilson, Kenny Rogers, JoAnna Garcia and Chris Elliott have all paid Mother a visit this season, while Carrie Underwood will make her acting debut on the show in March.