In the same skillet used to cook the shrimp, melt the butter. Add sliced mushrooms and cook 5 to 7 minutes, stirring occasionally, until they start to brown and release moisture. Add minced garlic and cook until fragrant, about 1 minute (do not let it burn).
Sprinkle in the flour. Stir to coat the mushrooms, cooking for about 30 seconds to 1 minute until the raw flour smell is gone and there are no visible white streaks. Then add tomato paste, mixing well.
Gradually pour in the vegetable stock about ½ to 1 cup at a time, stirring after each addition, bringing the sauce to a simmer. Let it thicken slightly.
Stir in the chopped sun-dried tomatoes. Reduce heat to low. Add spinach in batches, letting each batch wilt before adding more.
Add red pepper flakes for a bit of heat (optional).
Stir in the Parmesan cheese and heavy cream. Bring the sauce back to a gentle simmer and allow it to cook 1 to 2 minutes until creamy. If sauce seems too thick, use reserved pasta water (if you saved it) or more stock to thin out.
Remove from heat, then fold in the cooked penne pasta and the shrimp. Stir gently to ensure shrimp and pasta are well coated with sauce.
Taste, then adjust seasoning, adding more salt, pepper or Italian seasoning if needed. Garnish with fresh chopped basil. Serve.