In a small saucepan, mix milk into flour gradually to prevent lumps. Cook, stirring constantly over low heat until thick. Cover with waxed paper and cool completely or set in bowl of ice water and stir until cooled.
Beat margarine and sugar for 4 minutes. Add cooled paste and vanilla essence and beat well.