Cook the spaghetti according to package instructions in salted boiling water until al dente. Drain, but reserve 1/4 cup of the pasta water.
In a pan heat the pesto up with the spaghetti water. Add the drained spaghetti to the pan and tossing everything together to coat the spaghetti evenly.
Drizzle with olive oil (optional) and season with salt and pepper.