In a medium sized pot, add in the oil. Add in the rosemary, thyme, onion, and garlic. Cook over medium heat until the oil is fragrant. This process takes no more than ten minutes. Let the oil cool down and strain. This step can be completed a day or two ahead.
Pour strained oil back into the pot. Add in the paprika, chili flakes, and salt. Heat up until oil is just warm, around 200F. It should be at low heat.
Add in the shrimp in bulk, carefully. Doing this brings down the temperature of the oil so that it does not fry the shrimp. Keep oil on low heat. Monitor the heat to be sure it is not too hot. Cook until shrimp for about 20 minutes when it starts getting a pink hue.