Joseph presented most of his family to his boss, the Pharaoh. The Pharaoh asked the usual questions, how do you do, what's your occupation? Joseph's family replied that they were all shepherds, like their fathers before them.
The Pharaoh gave them the land of Goshen, and told Joseph that if any among them was particularly good with animals, that they could be in charge of the Pharaoh's flocks.
Jacob blessed the Pharaoh, and the Pharaoh asked how old he was. Jacob told the credulous Pharaoh that he was 130 years old. The Pharaoh replied, oh how nice for you, and was blessed again before dismissing the sheepy family.
This is how Joseph was able to provide for his family in the terrible famine.
Meanwhile, Joseph was still in charge of the grain stores. There was no food, so people came and bought it from Joseph from around the whole region, with money. Then the money ran out and they wanted it for free. Joseph told them his would sell them food in exchange for their livestock. So people from all around brought livestock to buy food.
Then they ran out of livestock. Hm. What to do. I know!
Joseph told the people who came for food but had nothing in exchange that he would give them food if they pledged their lands and their SELVES to the Pharaoh. Okay, I am not being true to the account I'm reading. Let me back up.
It was all the PEOPLE's idea. Yeah, that's it. The people came to Joseph and begged to become slaves so that they could get food from the Pharaoh. So Joseph made them all slaves and took their lands. He told them that they owed the Pharaoh one-fifth (20 percent) of their crop the next time, and all times after, they reaped.
The priests were given grain anyway, they didn't need to sell anything to get their share.
So this is how Joseph put into practice a law the bible says is still in effect today: that 20% of all the harvests in Egypt go to the Pharaoh. Which is true to this day.
Joseph's family was spared slavery due to their connections, and they prospered in the land of Goshen.
Jacob (Israel) lived some 147 years in total, and when he was about to die, he made Joseph promise to bury him back in his homeland with his fathers and ancestors. Joseph agreed.