Mix flour, sugar and salt; gradually add milk. Cook over moderate heat, stirring constantly, until mixture thickens and boils. Cook 2 minutes and remove from heat.
Add small amount milk mixture to egg yolks, stir into remaining hot mixture; cook 1 minute, stirring constantly.
Add butter and vanilla; cool slightly. Pour into pastry shell and cool.