Alternatively, the acid may first be converted into an alkali metal salt, such as the sodium, potassium or lithium salt, which is then reacted with an alkyl halide which also contains a protected thiol group in a polar solvent, such as DMF, to produce the ester.