Chances are, your baby is not going to love this experience for long, so get everything ready before you put them in the pumpkin. You'll want to set your camera or phone to shoot continuously so you'll be able to capture those smiles. You may have only a minute or two at a time before the baby starts to object.
The key here is to do multiple photoshoots. Start at the best possible time when the baby is rested, fed, and happy. Shoot until they get annoyed, and then take a break before they get really mad. Wait and shoot again. Keep going until you get your photo.
Quick Tip
Here's a little insider advice for getting those smiles. You know the most obnoxious song or video your baby loves? Play that on your phone right next to the camera so your little one will look and smile.