Pick the beetles off with a gloved hand or pair of tweezers and place them in a bucket of water to drown them. Squeeze them before putting them in the bucket.
Spray your pumpkins with an insecticidal soap to pretreat and kill the beetles. The drawback to the soap is that it doesn't last very long and isn't very powerful. A strong, more effective insecticide is pyrethroid, but it may also kill beneficial insects.
Apply 3.8 fluid ounces per 1,000 feet of row in the soil furrow at planting with carbofuran. Often sold under the name Furadan 4F, it can be mixed with water or liquid fertilizer.
Place sticky traps around your pumpkin plants. They ensnare and kill any bug that comes across them. If you expect a lot of beetles, sticky traps will catch them and other unwanted insects.