Cook the spag according to the instructions on the packet. In the last 4 minutes of cooking time, add the frozen peas into the spaghetti to cook through.
Drain the spaghetti and peas, but keep 250mls/1 cup of the pasta water back - you'll use this later. Keep the pasta and peas in the colander.