In Islam, if a woman breastfeeds a child under the age of 2 for five feedings, then the rulings on relationships through breastfeeding are established. She becomes his mother through breastfeeding, her husband becomes his father through breastfeeding, and all her children and the children of her husband, whether they are their own children or children through breastfeeding, become siblings of this child who was breastfed.
This is not regarded as a trick, rather it is a legitimate shar’i solution which will enable this woman to raise this child and take care of him, and there is the hope that she will be rewarded for that by Allaah. The Prophet (peace and blessings of Allaah be upon him) said to the wife of Abu Hudhayfah concerning Saalim, the freed slave of Abu Hudhayfah: “Breastfeed him, then you will become his mahram.” Narrated by Muslim (1453).
*Note: a mahram is someone who is considered family who you’re not able to marry, like a brother, father, etc. And in the case of someone who wears hijab (head scarf), they do not have to cover in front of a mahram.