01 -
Mince garlic cloves and finely chop the shallot. Grate zucchini using the large holes of a box grater or a food processor fitted with a shredding disc. Grate Parmesan cheese and thinly slice basil leaves. Juice half of the lemon to yield 1 tablespoon.
02 -
Fill a large pot with water, season generously with salt, and bring to a boil over medium-high heat.
03 -
Melt the unsalted butter in a 30 cm skillet over medium heat. Add shallot and garlic, cooking until softened, about 1 minute.
04 -
Add grated zucchini, kosher salt, and red pepper flakes if using. Cook, stirring occasionally, until the released liquid evaporates and zucchini becomes tender and almost melting, about 15 minutes.
05 -
Add spaghetti to the boiling water. Stir frequently to prevent sticking. Cook for 1 minute less than package instructions for al dente. Reserve 180 ml pasta water, then drain the pasta.
06 -
Transfer drained pasta to the skillet with zucchini. Pour in 120 ml reserved pasta water and lemon juice. Toss over medium heat for 1–2 minutes until the sauce thickens and coats the noodles. Add more pasta water, a tablespoon at a time, as needed for a silky sauce.
07 -
Remove from heat. Add grated Parmesan and basil, tossing to combine thoroughly. Season with additional salt and black pepper to taste. Garnish with extra Parmesan before serving.