Cook the pasta according to the instructions, but 1 minute less than directed.
Save 1 cup of pasta water.
Drain the pasta.
Add the ricotta, pesto, and a little bit pasta water to the pan in a lower heat. You can always add more if needed, but start with a few tablespoons - 1/4 cup.
Stir to combine well.
Return the pasta to the pan and combine with the sauce.