US food group Ralcorp Holdings is to buy pasta supplier American Italian Pasta Co. in a deal worth US$1.2bn.