Pre-heat oven to 200 degrees celsius.
Chop pumpkin into approx 20 cubes (allow approx 10 cubes of pumpkin per person) and add to a baking tray with 2 tbsp of olive oil. Roast for approx 30 minutes, turning the pumpkin every 10 minutes.
After 15 minutes of the pumpkin roasting, cook the spaghetti according to instructions. This will take around 10 minutes.
Once the spaghetti is cooked drain and place into a bowl.
Stir the pesto mixture through the spaghetti.
Top with pumpkin and serve.