01 - Pat the shrimp dry with paper towels and season generously with salt and freshly ground black pepper.
02 - Heat 1 tablespoon of butter in a large sauté pan over medium-high heat. Arrange the shrimp in a single layer and cook for 1 to 2 minutes per side until they turn pink and are just cooked through. Transfer to a plate and set aside.
03 - Add the remaining butter to the same pan. Sauté the chopped onion for 2 to 3 minutes until translucent. Stir in the minced garlic and cook for 30 seconds until fragrant.
04 - Add the orzo to the pan and toast for 1 to 2 minutes, stirring constantly to coat the pasta evenly. Pour in the white wine if using, and allow it to evaporate while stirring occasionally.
05 - Gradually add the broth, half a cup at a time, stirring frequently. Allow the orzo to absorb each addition before adding more. Continue this process until the orzo is tender and the mixture is creamy, approximately 10 to 12 minutes.
06 - Stir in the heavy cream and Parmesan cheese until the sauce is smooth and well combined. Fold in the baby spinach and cook for about 1 minute until wilted.
07 - Return the shrimp to the pan. Add the lemon zest, lemon juice, chopped parsley, and red pepper flakes if using. Gently stir everything together until heated through. Taste and adjust the seasoning as needed.
08 - Serve immediately while hot, garnished with additional parsley and lemon wedges on the side if desired.