To make the flavored butter: Heat the olive oil in a small skillet over medium heat. Add the garlic and cook until pale golden, about 1 minute. Stir in the shallots, season generously with salt and pepper, and continue cooking, shaking the skillet, until the shallots are wilted, about 2 minutes. Add ¼ cup of the wine, bring to a boil, and cook until about half of the wine has evaporated. Stir in 1 tablespoon of the lemon juice and boil until almost all of the liquid has evaporated. Transfer to a small bowl and cool completely. Add the butter, parsley, and tarragon and beat until blended. To make the butter easier to handle, spoon it onto a 12-inch length of plastic wrap and roll it into a log shape, completely wrapped in plastic. Chill thoroughly. (The flavored butter can be made several hours, or up to a few days, in advance.)
Place the rack in the lowest position and preheat the oven to 475° F. Peel the shrimp, leaving the tail and last shell segment attached.
Devein the shrimp by making a shallow cut along the curved back of the shrimp and extracting the black or gray vein that runs the length of the shrimp. Lay the shrimp flat on the work surface and, starting at the thick end, make a horizontal cut along the center of the shrimp, extending it about three-quarters of the way down. Pat shrimp dry.
Using some of the flavored butter, lightly grease a shallow baking pan, such as a jelly-roll pan, or ovenproof saute pan into which the shrimp fit comfortably without touching. Place each shrimp on the work surface with the underside of the tail facing up and away from you. With your fingers, roll each half of the slit part of the shrimp in toward and underneath the tail, forming a ”6” on each side of the shrimp which will lift the tail up.
Arrange the shrimp, tails up, on the prepared sheet or saute pan as you work, leaving some space between. Cut the remaining flavored butter into 1 2-inch cubes and disperse the cubes among the shrimp. Mix the remaining ¼ cup wine and 1 tablespoon lemon juice and add to the pan. Scatter the thyme sprigs over and around the shrimp. Season with salt and pepper and place the pan on the oven rack. Roast until the shrimp are firm and crunchy and barely opaque in the center, about 5 minutes. Transfer the shrimp to a hot platter or divide among hot plates. Drain the pan juices into a small pan. Bring to a boil over high heat and boil until the sauce is lightly thickened, 1 to 2 minutes. Spoon the sauce over the shrimp as is, or strain it first for a more velvety texture. Serve immediately.