Use a pair of kitchen shears or scissors to cut the backs of the shrimp and remove the vein. Set aside.
Combine the remaining ingredients except the barbecue sauce in a medium nonreactive bowl and stir well to combine. Add the shrimp and toss to coat evenly. Cover and refrigerate for at least 20 minutes, and up to 1 hour before proceeding.
Preheat a grill or grill pan to medium-high heat and spray with nonstick cooking spray. Once the grill is hot, remove the shrimp from the marinade and place on the grill. Cook for 4 to 5 minutes, then turn and brush generously with the barbecue sauce. Continue to cook on the second side for another 4 or 5 minutes, or until just cooked through, and brush with more sauce, on the other side, just before serving.
Heat a 1-quart saucepan over medium heat. Add the vegetable oil to the pan and, once it's hot, add the onions and garlic to the pan. Cook the onions and garlic, stirring often, until softened, 3 to 4 minutes. Add the vinegar to the pan and cook for 2 minutes. Place the remainder of the ingredients in the saucepan and bring to a simmer. Cook the sauce for 20 minutes, or until thick enough to coat the back of a spoon, and remove from the heat. Cool, then transfer to a nonreactive container and refrigerate until ready to use. The sauce may be used warm or at room temperature and will keep, refrigerated, for up to 2 weeks.