Showtime has ordered a pilot for the offbeat comedy “Crazy Ex-Girlfriend” from “The Devil Wears Prada” scribe Aline Brosh McKenna, hyphenate Rachel Bloom and “The Amazing Spider-Man” director Marc Webb.

Bloom, a comedian and staff writer on Adult Swim’s “Robot Chicken,” stars as a woman who gives up her partnership at a Manhattan law firm in an effort to find happiness in the Los Angeles suburb of West Covina. Brosh McKenna and Bloom wrote the pilot and exec produce with Webb, who is on board to direct for CBS Television Studios.

“Crazy Ex-Girlfriend” is described as a half-hour comedy with musical elements. Showtime Networks prexy David Nevins calls it an “exciting change of pace” for the cabler. Brosh McKenna introduced Bloom to the cabler after discovery her musical comedy vids on the Internet.

Webb, who made his feature debut with “500 Days of Summer,” is coming off two high-octane “Spider-Man” pics and was looking to work in a different arena, Nevins said.

Project “is built on the inspired comedy and songwriting of Rachel Bloom – who we believe, is ready to break out,” Nevins said, adding that Brosh McKenna brings a “brilliant, contemporary comedy voice that is spot on as showrunner of this project.”

Brosh McKenna praised Showtime and CBS TV Studios for providing “both freedom and support, which is all writers can really ask for.”

Showtime has stocked up its pilot slate for the coming year. The order for “Crazy Ex-Girlfriend” comes on the heels of last week’s greenlight of a pilot for Cameron Crowe/J.J. Abrams/Winnie Holzman comedy “Roadies.” The CBS Corp. cabler also has the Wall Street drama pilot “Billions,” from Andrew Ross Sorkin, Brian Koppelman and David Levien, in the pipeline.

Brosh McKenna’s upcoming pics include Sony Pictures’ “Annie” and Disney’s “Cruella de Vil.”

Bloom is repped by UTA, 3 Arts and attorney Lev Ginsburg. Brosh McKenna and Webb are with CAA.