SPOILER ALERT: Do not read if you have not yet watched “Charlotte Bronte and a Backhoe,” the 14th episode of the fifth season of “Mom.”

Just a few weeks after Christy (Anna Faris) faced temptation and almost fell off the wagon on “Mom,” her friend and fellow support group member Jill (Jaime Pressly) experienced a relapse of her own.

“It just so happened that, organically, both of these stories went to those places,” co-creator and executive producer Gemma Baker tells Variety. “We really write one episode at a time, and it just so happened that these were back-to-back.”

When it came to exploring the idea of a relapse with Christy, Baker says that it felt “right for the story” that she would consider drinking for a “split second.”

“Christy was in a place where she was doing really well. She thought she was going to graduate and then go to law school. She thought that was what was going to happen. And then she got this sudden bad news [that she didn’t get into law school] and happened to be in a place where there was alcohol,” Baker points out. “The fact that she almost drinks underlines how much she was counting on this being the thing that was going to work out — it didn’t even occur to her that it wasn’t going to work out. It was just a terrible blow.”

Ultimately, though, Christy stayed committed to her sobriety and later confessed her near-slip. Jill’s story was a bit more complicated.

“She’s been struggling for a long time, and she’s been looking for solutions in a lot of places. She’s really been dealing with a lot of pain for two seasons,” Baker says of Jill. “She wanted to have a baby but then had a miscarriage. She turned her attention to fostering a child, but then she went back to her birth mother. And then she turned to food. She’s really been spiraling for awhile.”

Jill went to a wellness retreat to get her food issues under control and ended up working with “inner strength coach” Miranda (Kristin Chenoweth).

“Kristin has incredible timing [and] she is so warm and so funny and she fit right in on the set,” Baker says. “We started with the idea of having a guru type character to come back with Jill from this retreat and then Kristin was the first person we thought of for it.”

Miranda tried to teach Jill she could indulge in certain foods in moderation. Jill then tried the same thing with alcohol, which taught her and her coach the valuable lesson that addicts can’t handle drugs or alcohol in moderation.

“She wanted this quick fix with this spiritual guide, and she wasn’t dealing with what was really wrong,” Baker says.

But it was important for Baker and the rest of the “Mom” team to show that although Miranda may have been misguided in some of her work with Jill, she was not malicious — and she was also not a fraud.

“She believes in what she’s doing, and what she was bringing to the group was valid. She did help Christy, she did help Bonnie — it wasn’t a scam,” Baker says. “But when she tried to talk about addiction, she didn’t know what she was talking about as much. And then Jill made the choice to take that suggestion and apply it to drinking.”

The journey for anyone in recovery is filled with good days and bad, and the journey on “Mom” is not just to do a “very special episode” that feature a relapse but have the characters bounce back immediately.

“We try to be truthful about addiction, so there will be ramifications of Jill’s relapse. It will be addressed again — it won’t be just back to normal next week,” Baker admits. “The women are all affected by the fact that their good friend suddenly drank and they didn’t see it coming.”

However, as “Mom” now moves towards its fifth season finale, the focus is still on celebrating these women who are working hard at recovery.

“Their lives are getting bigger,” Baker says, noting Christy is working towards becoming a lawyer and having a continued, healthy relationship while her mother Bonnie (Allison Janney) is working towards getting married. “Because we’re dealing with recovery, we have so much room to have the characters grow and change.”

Although it was not the plan when the show first started, every season has ended with Christy’s sober anniversary, which allows the show to end in a hopeful place, despite any hardships the characters endured throughout the 22 episodes.

“Whether you see her in a meeting or she’s at the restaurant with her friends, we recognize that she has had another year of sobriety,” Baker says. “She’s been able to have these shares that wrap up her previous year — or our season — and talk about the highs and lows about how it’s changed her. So no matter what happens, we’re able to end on a positive note. And we’re going to see Christy get a win this season. I think she’s due for a win!”

“Mom” airs Thursdays at 9 p.m. on CBS.