I wasn't sure if I was going to do a tutorial on this because it is a little difficult to explain, but I'm going to give it a shot.
First step is to use a fake pumpkin and cut a hole into the top, just like you would with a real pumpkin. Then you will need to measure the inside dimensions of your pumpkin. This way you will make sure you make the mechanism that dispenses the candy to fit. Now you need to cut a hole on the front of the pumpkin so that you have a place for the candy to shoot out. I marked where I wanted the face to go ahead beforehand so I wouldn't make a mistake on how high or low I wanted to place the mouth.
Here is the tricky part, the mechanism. I constructed most of it out of foam core. You will have to fiddle with the dimensions to get it right since not all the fake pumpkins are the same size. Also, keep in mind the size of candy you want to dispense. I did the mini candy bars, but you could definitely go up a size and increase the hole. I was able to put most of the mechanism together outside the pumpkin, but had to put a couple pieces together inside the pumpkin. That is a little difficult and you might want to go ahead and cut a hole on the bottom to make it easier on yourself.
Here is the mechanism shown outside the pumpkin.
As you can see, it is basically a box with a hole in the top for the candy to fall through. It will hit the block of wood and then you will use the knob to get the candy out.
The knob is connected to a small block of wood by a metal rod. Once the candy is pushed by the knob it will fall and hit the slide and shoot out the pumpkin's mouth. If you would like a video showing this being done, please let me know and I will upload one. Now you will need to put another layer of foam core over the entire mechanism so you can hold all the candy.
Go ahead and draw a face on your pumpkin. Make it as spooky or as silly as you want. I opted for silly.
Now it's candy time. Fill your pumpkin up with candy treats.You can either put the lid back on our add a hat like I did.