Another way to say "Spices are used to flavor food." is "Flavoring food might be done with spices."