If using bamboo skewers, soak in water for at least 30 minutes.
Prepare the grill for direct cooking over medium heat (350° to 450°F).
Brush the cooking grates clean. Grill the chile peppers over direct medium heat, with the lid closed as much as possible, until they are blackened and blistered in spots all over, 8 to 12 minutes, turning occasionally. Put the chiles in a bowl, cover with plastic wrap, and let steam for 10 minutes. When cool enough to handle, remove and discard the stem ends, skins, and seeds. Drop the chiles into a food processor or blender. Add the remaining sauce ingredients. Process to create a smooth dipping sauce. If the sauce seems too thick, add a little water. Spoon the sauce into a serving bowl.
In a small bowl mix the rub ingredients.
Lay 5 to 7 shrimp on a work surface and arrange them so that the shrimp on one end lays one way and all the rest lay in the same direction. Choose shrimp that are the same size so that you can nestle them together with no empty spaces between them. This will help to keep the shrimp from spinning and prevent them from drying out on the grill. Pick up and skewer each shrimp through the middle, pushing the shrimp together on each skewer. Repeat the process with the remaining shrimp and skewers. Lightly brush the skewers with oil and then season them evenly with the rub.
Increase the temperature of the grill to high heat (450° to 550°F). Brush the cooking grates clean. Grill the shrimp over direct high heat, with the lid closed as much as possible, until slightly firm on the surface and opaque in the center, 2 to 4 minutes, turning once. Remove from the grill and serve warm with the dipping sauce.