Apparently Hayek was told that children in Sierra Leon frequently die from malnutrition, partly because women stop breastfeeding too soon due to pressure on them from their husbands:
The following video explains the whole episode.
This story brings up a ton of moral issues. Most obviously the sexism and patriarchy of men in Sierra Leon, but also the question of whether it is appropriate for a woman to breastfeed another's child.
It seems to me that Ms. Hayek was acting out of compassion and trying to set an example to inspire the women to resist pressure to not breast feed. In fact I admire Salma Hayek for doing it. I think she was making a powerful statement. She was empowering women, and fighting - symbolocially - agaist the patriarchal culture that stops breast feeding early there.
But the topic is worth much discussion.