The book title contains lyrics from one of the songs in the musical, “What’s Inside,” with the recipe’s narrative written by Daniel Gercke in the voice of Jenna, as if she’s describing why she named a concoction, “Betrayed By My Eggs Pie.” There are both sweet and savory pies along with tips for making your own crusts, including how to weave a lattice crust on top.

We talked to Castle about how the pop culture pie book is one of the highlights of her career, thanks to the camaraderie of her collaborators, and how she is giving pie a second look.

“A lot of people don’t think of someone inventing recipes,” Castle said. “I just appreciate anyone who can tell a good story. At the end of the day, I’m a story teller. It revolves around food as an entry point. I’m just glad I’ve had some little part in telling this charming story.”

Q: How did you get involved in this?

A: I actually got a call from my literary agent. The project came up from the owner of my literary agency, a Broadway producer and cookbook editor Pam Krauss. (They said) there ought to be a companion cookbook. My name came up as someone who could do the recipes. There was a really really quick turnaround. They had a writer. I agreed to do the recipes because of the opportunity to work with Pam.

Q: What’s your pie background?

A: I really didn’t have a whole lot of pie background. I don’t consider myself a stellar pie baker. I do now. I’m known as a creative cook and having a bit of wit and sass in my food. When the editor made the decision, it was more my approach to cooking.

Q: Had you seen the movie or musical?

A: I’ve seen the movie, not the musical. I know what a beloved story it is. People feel attached to the story and the character. It’s like reading a book and then seeing the movie. ... People have notions of what the pies will be, based on the title and the role. I wanted to do right by that.

The Tony-nominated musical “Waitress,” which starred Jessie Mueller originating the role of Jenna, is based on the 2007 independent film that starred Keri Russell.

Joan Marcus

Q: How many recipes were you expected to develop?

A: 40. We went through the script and pulled out in the dialogue and in the lyrics any references to pies that were mentioned at all. Some of them, even in the text, there would be, ‘I’m adding a pinch of this, a sprinkle of that.’ There was one called a Deep-Dish Blueberry-Bacon Pie. That means it needs to have bacon and blueberries.

In others, it was 100 percent up to me to come up with it. I’ve got to dig deep to figure out what this would look like. Even more so, how am I going to combine this into a pie that’s going to be delicious, rather than peculiar.

One was Old Joe’s Horny Past Pie. I knew we wanted some of these pies to be savory. On that one, I made one that had some goat cheese in it. And no one one else would notice this. It was a tomato pie. I used a Ritz Cracker crust. Andy Griffith (who starred in the film) used to be a Ritz Cracker spokesman. That’s an inside joke that amused me.

Sometimes the pie needed to be a straight-up cherry pie. On some of these, I had to dig deep, to think, no one has ever done this before. I wanted these pies to be a showstopper worthy of a Broadway show.

Q: My Husband’s a Jerk Chicken Pie was more straightforward. What about I Can’t Have An Affair Because It’s Wrong (and I Don’t Want Earl to Kill Me) Marbled Chocolate Cheesecake Pie?

A: That chocolate cheesecake was black and white. These issues weren’t necessarily black and white for (Jenna). It seemed to be part of her thought process: I’m attracted to this doctor, but my husband is going to kill me.

With Take Me to the Moon Peanut Butter MoonPie Pie, I come to find out people aren’t as familiar (with MoonPies) as we are. That was a hard sell of mine. I wound up making a pie with the characteristics of the MoonPie and a MoonPie as a garnish. It ended up on the cover.

Q: This recipe development process must have been different than other ones.

A: I had 30 days to come up with 40 brand new original pies. (Castle said one pie was made by the production’s pie consultant.) Nothing comes out on the first try. This came up at the last minute. It came up in July. I had August to do it.

I do remember one day, I had pies on pretty much every surface of my house. There were 80 some pies in rotation at that time.

Q: What’s it like to see your book tied to such a popular musical?

A: It’s fascinating. I never thought in my life I’d get interviewed by Entertainment Weekly. I’d like to think everything I do is fun. But not everything is pop culture. This is novel for me.

Q: Does this make you rethink pie?

A: It has made me rethink pie. It makes me realize there are pie fundamentals. I’d been one of those people in a good-hearted debate, like barbecue wars. I was a cake person.

It’s made me have a lot more affection toward pie. Pie makes people happy. It’s a particularly American thing. You can do cakes around the world. We do pie. That’s one of our contributions to the world’s cuisine.

Real happiness never tastes how you thought it would. A lime is about the sourest, unfriendliest excuse for a fruit you could ever hope to meet. But sweet-talk it with condensed milk and soothe it with egg yolks, and it’s kindness in the shape of a pie. The cutting sharpness lifts up the gentle sweetness till it floats on your tongue. A little tequila and triple sec – well, I’m not saying they’re the key to happiness, but they can’t hurt, either. And for the final touch, the note of salt in the pretzel crust and the whipped cream topping make this pie the closest thing there is to a margarita on a fork. Give this pie a fresh start by chilling it as cold as you can get it before serving it up.

Key limes are smaller and rounder than conventional limes, and can be hard to come by in many areas of the country. Although in most cases fresh fruit juice makes for a tastier pie, unless you have access to very fresh, juicy key limes, this pie works best when made with bottled key lime juice, which delivers consistent acidity and flavor.

Pretzel Crumb Pie Shell

1 3/4 cups pretzel crumbs

2 tablespoons granulated sugar

6 tablespoons (3/4 stick) unsalted butter, melted

Filling

2 (14-ounce) cans sweetened condensed milk

4 large egg yolks

3/4 cup bottled key lime juice, preferably Nellie and Joe’s brand

1/4 cup blanco tequila

1 tablespoon triple sec

Salted Whipped Cream Topping

1 cup heavy cream, chilled

2 tablespoons confectioners’ sugar

1 teaspoon pure vanilla extract

1 1/2 teaspoons coarse or flaked sea salt

Grated lemon zest

For the pie shell:Preheat the oven to 350 degrees. Toss together the crumbs and butter in a medium bowl to moisten. Press the mixture onto the bottom and up the sides of a 9½-inch deep-dish pie pan. Refrigerate for at least 15 minutes to firm up the butter. Bake in the center of the oven for about 10 minutes or until just set and fragrant. Place on a wire rack to cool to room temperature.

For the filling:Whisk together the condensed milk and egg yolks in large bowl until smooth. Add the key lime juice, tequila and triple sec and whisk until smooth. Let stand for 5 minutes to thicken. Pour into the pie shell.

Bake in the center of the oven for 15 minutes. Place on a wire rack to cool to room temperature. Refrigerate for 1 hour or until chilled.

For the topping: Use a mixer to beat the cream, confectioners’ sugar, and vanilla to firm peaks on high speed. Transfer the cream to a piping bag fitted with a rippled tip (#885) and pipe onto the pie decoratively. (You can also just pile the cream directly onto the pie and spread with an offset spatula if you prefer.) Sprinkle with the salt and lemon zest before serving.

Makes one 9½-inch pie.

Reprinted from “Sugar, Butter, Flour” by arrangement with Pam Krauss Books/Avery, a member of Penguin Group (USA) LLC, A Penguin Random House Company. Copyright 2017. Text by Daniel Gercke. Recipe by Sheri Castle.

Jenna’s Devil’s Food Chocolate Oasis Pie

This one is a thing of beauty. The flavors open themselves one by one, like chapters in a book. First you get flooded with chocolate, dark and bittersweet like an old flame. And then strawberry, the way strawberry was always supposed to taste but never knew how. And finally the whipped cream covers everything in a dreamy sweet cloud. A customer once called this a perfect pie. I don’t know about that, but it’s certainly a pie you won’t mind getting a little lost in.

Chocolate Cookie Crumb Pie Shell

1 3/4 cups chocolate wafer cookie crumbs (about 36 cookies)

6 tablespoons (3/4 stick) unsalted butter, melted

Chocolate Cream Filling

1/2 cup strawberry preserves

2 tablespoons aged balsamic vinegar

2/3 cup granulated sugar

1/4 cup cornstarch

1/2 teaspoon kosher salt

4 large egg yolks

3 cups whole milk

7 ounces bittersweet chocolate, chopped

2 tablespoons unsalted butter, at room temperature

1 teaspoon pure vanilla extract

Chocolate Covered Strawberries

8 ounces semisweet chocolate chips

1 heaping tablespoon vegetable shortening

16 large fresh strawberries, hulled

Strawberry Whipped Cream Topping

1 cup heavy cream, chilled

2 tablespoons confectioners’ sugar

1/3 cup crushed fresh strawberries

For the pie shell:Preheat the oven to 350 degrees. Toss together the crumbs and butter in a medium bowl to moisten. Press the mixture onto the bottom and up the sides of a 9½-inch deep-dish pie pan. Refrigerate for at least 15 minutes to firm up the butter. Bake in the center of the oven for about 10 minutes, or until just set and fragrant. Place on a wire rack to cool to room temperature

For the filling:Stir together the preserves and vinegar in a small bowl. Spread over the bottom of the chilled crust and return to the refrigerator.

Whisk together the granulated sugar, cornstarch, salt and egg yolks in a large, heavy saucepan. While whisking continuously, add the milk in a slow, steady stream. Bring to a boil over medium heat, whisking, then reduce the heat and simmer, whisking, for 1 minute, or until the filling is very thick. Remove from the heat, add the chocolate, butter and vanilla, and stir until smooth.

Pass the pastry cream through a fine sieve into a glass or metal bowl, using a rubber spatula to press it through the mesh. Press a piece of buttered parchment paper directly onto the surface to prevent a skin from forming. Let cool to room temperature and then pour the filling into the crust. Refrigerate at least 6 hours or until fully set.

For the berries:Place the chocolate chips and shortening in a medium glass bowl. Microwave on 50 percent power in 30-second intervals until the chips begin to lose their shape. Stir until melted and smooth.

Rinse the berries and blot dry. Holding the berries by the stem end, dip them one at a time into the chocolate, letting any excess drip back into the bowl. Place the coated berries on a plate lined with parchment or waxed paper. Refrigerate for about 30 minutes, or until the chocolate hardens.

For the topping:In a medium bowl using a handheld mixer, beat the cream and confectioners’ sugar on high speed until it holds firm peaks. Fold in the crushed strawberries. Spread over the chilled pie. Arrange the chocolate-covered strawberries on top.

Makes one 9½-inch pie.

Reprinted from “Sugar, Butter, Flour” by arrangement with Pam Krauss Books/Avery, a member of Penguin Group (USA) LLC, A Penguin Random House Company. Copyright 2017. Text by Daniel Gercke. Recipe by Sheri Castle.

Getting Out of the Mud Frozen Mud Pie

How do you dig yourself out of an overwhelming stack of troubles? Turns out, you don’t have to do it alone. Take an avalanche of cool, sweet ice cream. Flow it into a shell made of crushed of sugar cones. Glaze it over with thick, fudgy chocolate, just enough to lock it up. Now take five spoons, get a bunch of your friends over, and eat your way out, one bite at a time, till there’s a clear path to the edges and you’ve talked out your woes. Getting unstuck isn’t easy, but it sure helps to have a few extra spoons.

Sugar Cone Pie Shell

1 3/4 cups ice cream sugar cone crumbs

6 tablespoons (3/4 stick) unsalted butter, melted

Glaze

6 ounces semisweet chocolate, chopped

1 cup confectioners’ sugar

4 tablespoons (1/2 stick) unsalted butter

1/4 cup heavy cream

2 tablespoons light corn syrup

1 teaspoon almond extract

Filling

2 pints mocha almond ice cream

1/2 cup sliced almonds, toasted and cooled

For the pie shell:Preheat the oven to 350 degrees. Toss together the crumbs and butter in a medium bowl to moisten. Press the mixture onto the bottom and up the sides of a 9½-inch deep-dish pie pan. Refrigerate for at least 15 minutes to firm up the butter. Bake in the center of the oven for about 10 minutes or until just set and fragrant. Place on a wire rack to cool to room temperature.

For the glaze:Heat the chocolate, confectioners’ sugar, butter, cream, and corn syrup in a small saucepan over low heat, stirring until smooth. Remove the pan from the heat and stir in the almond extract. Let sit until lukewarm. Pour half the glaze into the bottom of the pie shell and spread until even; refrigerate 30 minutes or until the glaze sets. Reserve the rest of the glaze.

For the filling:Let the ice cream sit at room temperature for about 10 minutes or until soft enough to scoop and spread. Spread 2 cups of the ice cream in the pie shell.

If the reserved glaze has turned too firm to pour, reheat it over very low heat. Drizzle the ice cream with half the remaining glaze and sprinkle with half the almonds. Return to the refrigerator to chill for 15 minutes, then repeat the layers. Freeze for 2 hours or until firm.

Makes one 9½-inch pie.

Reprinted from “Sugar, Butter, Flour” by arrangement with Pam Krauss Books/Avery, a member of Penguin Group (USA) LLC, A Penguin Random House Company. Copyright 2017. Text by Daniel Gercke. Recipe by Sheri Castle.

Getting Out of the Mud Frozen Mud Pie is in “Sugar, Butter, Flour,” a cookbook of pie recipes tied to the Broadway musical “Waitress.” Chapel Hill author Sheri Castle developed the recipes. Evan SungUsed with permission

The Key Lime (to Happiness) Pie is in “Sugar, Butter, Flour,” a cookbook of pie recipes tied to the Broadway musical “Waitress.” Sheri Castle of Chapel Hill developed the recipes. Evan SungUsed with permission