Trim a little off the tops and roots of the shallots, then put into a bowl and cover with boiling water. Leave to soak for 3 minutes, then pour off the water and re-cover with cold water. Lift the shallots out one at a time and peel off the brown skins. Drain and layer in a bowl with the salt. Leave overnight.
Tip the shallots into a colander and drain off as much liquid as possible. Rinse with cold water, drain and dry with kitchen towel.
Add the vinegar and sugar to a saucepan with the garlic cloves, half the herbs, a pinch of salt and peppercorns. Heat gently until the sugar dissolves, stirring from time to time. Increase the heat to medium and simmer for 5 minutes. Leave to cool.
Pack the shallots tightly into warm, dry jars with the remaining herbs. Strain and pour the cold vinegar syrup over the shallots, making sure that the shallots are covered with the vinegar to the very top. Cover with screw-top lids. Label and leave to mature in a cool, dark place for 3–4 weeks.