By condensation of 3-methoxybenzaldehyde (I) with ethyl cyanoacetate (II) by means of NaOH in ethanol.
The condensation of 4-hydroxy-3-methoxybenzaldehyde (I) with ethyl cyanoacetate (II) by means of NaOH in ethanol gives the 2-cyanopropenoate (III), which is then alkylated at the OH group with ethyl 2-bromoacetate (IV) by means of K2CO3 and tetrabutylammonium bromide in THF.