"Samuel said to Saul, “I am the one the Lord sent to anoint you king over his people Israel; so listen now to the message from the Lord. 2 This is what the Lord Almighty says: ‘I will punish the Amalekites for what they did to Israel when they waylaid them as they came up from Egypt. 3 Now go, attack the Amalekites and totally destroy[a] all that belongs to them. Do not spare them; put to death men and women, children and infants, cattle and sheep, camels and donkeys.’”"
Later on it says that he was not happy with the outcome because they didn't kill all the livestock and people... Of course this is a work of mythology, but the message clearly isn't that the Israelites should go and loot from these people.