Step 1Cook the penne in boiling salted water until al dente, about 10 minutes. Drain, reserving 1/2 cup of the pasta water.
Step 2Meanwhile, melt the butter in a saucepan over medium heat. Add the shallots and garlic and cook for about 3 minutes. Add the wine and continue to cook until the liquid is reduced by half. Whisk in the flour.
Step 3Combine the ricotta and reserved pasta water in a bowl and whisk into the pan. The sauce will thicken immediately. Add the drained pasta to the sauce. Top with grated Parmesan before serving.