Pour vinegar, water, sugar, peppercorns and thyme into a small sauce pot. Bring to a boil.
Once boiling add the shallots. Turn off the heat and let them sit for 20 minutes at room temperature.
Place the onions and liquid in a jar together and refrigerate uncovered. Cover once completely cool. They will stay fresh for 2 – 3 months!