Bring a medium saucepan of salted water to a boil and cook the pasta according to the packet instructions. Reserve 1/2 cup cooking water and drain the pasta.
Meanwhile, in a large skillet over medium-low heat, warm 1 tablespoon olive oil, add the shallot and cook until soft, 3 to 5 minutes. Add the garlic and chile flakes and cook for 1 minute more.
Stir in the remaining 1 tablespoon olive oil and the zucchini, season with salt and pepper, and cook just long enough for the zucchini to soften and absorb some of the flavor from the garlic, shallot, and chile, 4 to 7 minutes.
Remove from the heat, add the basil leaves and allow the basil to wilt slightly. Add the lemon zest and juice.
Add the pasta to the skillet. Stir, adding a little pasta water, if necessary to thin the sauce.
Serve hot, with plenty of grated Parmesan and pine nuts scattered on top.