Wash the pumpkin, cut in half, scoop out and then cut into small cubes. Dice the onion and garlic.
Fry the onion, then the garlic and pumpkin in oil. Add a little water and cook until the pumpkin is soft. In the meantime, cook the spaghetti in salted water.
Mix the vegetables with salt, pepper, chilli and Italian herbs as well as a good dash of olive oil and season to taste.
Then add the drained spaghetti and stir everything well again.