Place shallots and peppercorns in a glass jar or bowl.
Whisk boiling water, vinegar and sugar together in a separate bowl or glass measuring cup until sugar is dissolved.
Pour the brine mixture into the shallots and give them a mix until they're mostly submerged.
Let the mixture rest at room temperature.
The pickled shallots can be used after sitting for 25 minutes or transferred to the refrigerator to chill. Keep covered in the refrigerator for up to 3 weeks.