Boil the pasta in boiling water.
Finely chop the onion and garlic.
Heat olive oil in a pan and sauté the onion and garlic.
Add heavy cream and basil pesto, then bring to a simmer.
Add the cooked pasta to the sauce and mix well.
Season with salt and pepper.
Serve in a bowl and sprinkle with Parmesan cheese.