While pasta is cooking, heat the oil in a frying pan over LOW to MEDIUM heat. Add the pesto, onion, salt and pepper. Cook until the onions are soft, about 5 minutes.
Once pasta is done, add to a large bowl. Then add the pesto mixture. Mix well and serve.