Start a large pot of water to boil and add the pasta (spaghetti, fettuccine, whatever) at some point during the below process so it's all done at the same time. If you're unsure, cook the sauce and leave it on low to keep warm while you cook the pasta. It's more important that the pasta not sit around than the shrimp.
Heat the butter in a saucepan and cook the garlic and red pepper flakes a few minutes, until the garlic is softened. In a small bowl whisk together the ricotta and milk, then add to the pan and stir until warmed. Mix in the other ingredients. If the shrimp is raw, heat at a very low simmer until cooked through. If the shrimp is cooked, just heat through.