Buzzmills uses felt. She sews them but they could be glued as well.
Get the instructions here:
http://buzzmills.typepad.com/blog/2012/10/tutorial-jack-o-lantern-treat-pocket.html
Martha Stewart shares a printable clip art fileto cut and tape into a pumpkin treat container.
Get the template here:
http://www.marthastewart.com/852607/jack-o-lantern-party-favors