Add butter to the skillet, followed by onions, garlic, tomatoes, and pepper flakes. Let it simmer for 2-3 minutes, stirring occasionally.
Add pasta to the pan, thoroughly mixing so it absorbs the sauce. Adjust seasonings and salt to taste. Return shrimp to the pan.