Heat the oil in a heavy pan (a cast iron pan is great for this), large enough for the shrimp to fit in one layer. When the oil is hot, start adding the shrimp to the pan—just a few at a time so as to not chill the oil down. Let the shrimp turn pink and the shell start to crisp up (about 3-4 minutes), then flip the shrimp over to cook on the other side.
Add the garlic, rosemary and dried chile, and cook for a few more minutes.
Using a slotted spoon, remove the shrimp with as much of the garlic and rosemary as you can get. Sprinkle immediately with salt, so that it sticks to the shells.
Serve immediately with wedges of lemon to squeeze over the shrimp. Eat everything: The shells will be crispy and flavorful. If you have head-on shrimp, pull the heads off and suck out the insides, or eat the shrimp heads as well.