You could also use LED candles or LED tea candles.
Carefully cut a keyhole shape in the bottom of your pumpkin.
This is how to put the Christmas light in:
You can use any color, I painted the clear light. Yellow paint works, Maybe Orange.
one coat of paint will do.
Place light in the center of the bottom and tape it down.
Mark for two holes on both sides of the cord
Remove the light and poke holes through the bottom
Use a long twist tie or other means to secure light
Place end of twist tie in one hole and then another.
Hold down light and tie. Tape down excess.