Spanish food group Ebro Puleva has agreed to buy US rice producer Riviana Foods for US$380m.