Cook the spaghetti: Bring a large pot of salted water to a boil. Cook the spaghetti according to the package directions until al dente. Drain and set aside.
Prepare the shrimp: Peel and devein the shrimp, reserving the heads. Rinse the peeled shrimp and shrimp heads separately, then drain well.
Sauté the shrimp heads: In a large skillet, heat the butter and olive oil over medium heat. Add the shrimp heads and sauté for about 3 minutes. This step releases their delicious juices and gives the dish its distinctive seafood flavor.
Remove the heads: Using a slotted spoon, remove and discard the shrimp heads, leaving the flavorful butter and oil in the skillet.
Cook the shrimp: Add the peeled shrimp to the same skillet and sauté for about 5 minutes, or until they turn opaque and are cooked through. Transfer the shrimp to a plate and cover to keep warm.
Sauté the garlic: In the same skillet, add the crushed garlic and chopped cilantro, if using. Add a little extra olive oil if needed. Sauté for about 2 minutes, stirring frequently, until fragrant. Be careful not to let the garlic brown.
Prepare the cream sauce: Pour in the heavy cream and add the grated Parmesan, salt, and chili flakes. Stir well and bring the sauce to a gentle simmer.
Combine with the spaghetti: Add the drained spaghetti to the skillet and toss until evenly coated with the creamy garlic sauce. Cook for about 30 seconds to allow the pasta to absorb the flavors. If desired, stir in 2 tablespoons of freshly squeezed lemon juice for a touch of brightness.
Serve: Transfer the spaghetti to a serving platter and arrange the cooked shrimp on top. Serve immediately and enjoy!