Preheat oven to 400° F. Line baking sheets with parchment paper and set aside.
In a bowl, whisk together the flour, baking powder, salt and pumpkin pie spice (if using). Set aside.
In a large bowl, combine softened butter and confectioners’ sugar using a hand mixer.¹ Beat until light and fluffy, about 1 to 2 minutes. Add the egg and vanilla, and beat until thoroughly incorporated, about 30 seconds. Scrape down sides as necessary.
With mixer on low, slowly add flour mixture to the bowl. The dough is ready when most of it sticks to the paddle. When touched, it has a little give, but does not stick to fingers. If it's too sticky, add more flour, 1 tablespoon at a time.
Flour the work surface and roll dough to about 1/4-inch thick, using flour for dusting as necessary. Use a pumpkin-shaped cookie cutter to cut cookies and place on prepared baking sheet. Gather scraps and re-roll dough when necessary. If baking in a warmer climate, chill cookies for 20 minutes before baking.
Bake for 7 to 8 minutes, rotating halfway through. Allow cookies to cool on baking sheet for 2 minutes, then transfer to wire rack to cool completely. Prepare icing.
Royal Icing
Place the meringue powder and 5 tablespoons water in a large mixing bowl, and whip with the whisk attachment until foamy, about 3 minutes.
Add the vanilla and confectioners' sugar, then whip on medium speed until thick, about 3 minutes. The royal icing should hold a medium soft peak. If necessary, thin with additional water, a few drops at a time, to get the desired consistency.
Transfer ¼ cup of icing to bowl. Add green food gel and stir. Transfer to an icing bag with a small round tip (I used Wilton #2).
To the bowl of remaining icing, add orange food gel and stir. Transfer to an icing bag fitted with a small round tip.
Outline the cooled pumpkin cookies with the orange icing first and add two lines to divide the pumpkin into thirds (this will mark the curves of the pumpkin). Let is dry completely. Fill with icing. Let it dry completely. This can take several hours.
Use the green icing to fill in the stem and add vines if desired. Dry completely.
Notes
Meringue powder can be found at your local baking store, craft store or online.Royal icing takes hours to dry until it is hard and cookies can be stacked or packaged. Be patient! It is worth the wait.Store in an airtight container at room temperature for up to 1 week. Place parchment paper between layers.Freeze for up to 3 months. Wrap cookies in plastic wrap and place in an airtight container. Defrost in the refrigerator before bringing to room temperature. Dough may also be frozen for up to 3 months.