If using fresh peas, remove them from the pods. (If using frozen peas, blanche in boiling water or thaw in the microwave).
In a large skillet over medium heat, melt the butter and add the onion. Cook the onion until lightly golden. Add the peas, salt and pepper and 1 cup of water. Cook for about 5 minutes.
Meanwhile, bring a large pot of salted water to a boil. Cook the pasta until al dente, drain it, reserving 1 cup of the cooking water. Add the pasta to the peas, and some of the water, only if the mixture seems dry.