Preheat oven to 200°c. In a 12-inch oven-safe skillet, melt butter over medium-high heat until foaming. Add sugar and stir to dissolve. Stir in vinegar, add thyme, and simmer until a glaze forms, about 1 minute. Add shallots, season with salt, and stir turning ,to coat with glaze. Transfer to oven and roast until shallots are browned and tender, about 40 minutes. Serve shallots right away, or refrigerate up to 3 days and reheat before serving.