Bring a large pot of salted water to a boil and add your pasta. Cook it until just al dente, since it'll continue softening slightly once tossed with the hot sauce later. Before draining, scoop out about half a cup of the starchy pasta water and set it aside for later use.
While the pasta cooks, add the fresh basil leaves to a blender or food processor along with a splash of the cream or a little olive oil. Pulse until you get a smooth, bright green paste. This step is what gives the sauce its deep basil flavor instead of just floating leaf bits.
In a large skillet, melt the butter over medium heat and add the chopped shallot. Cook for about two minutes until it turns soft and translucent, then stir in the minced garlic. Let it cook for another thirty seconds until fragrant, being careful not to let it brown or turn bitter.
Pour the heavy cream into the skillet and stir well, letting it come to a gentle simmer. Add the grated parmesan a little at a time, stirring continuously so it melts smoothly into the sauce instead of clumping. Let this simmer for three to four minutes until it thickens slightly.
Stir the blended basil paste into the simmering cream sauce until the whole mixture turns a beautiful pale green. Season with salt, pepper, and red pepper flakes if using. Let it cook for another minute so the flavors settle together nicely.
Add the drained pasta directly into the skillet and toss it well so every strand gets coated in sauce. If the sauce feels too thick, add the reserved pasta water a little at a time until you reach a silky consistency. Finish with lemon zest if you're using it, then serve immediately while hot.