So it came to pass that Joseph took five of his brothers to go see Pharaoh. As planned, he told Pharaoh they were shepherds, and they told Pharaoh they had nowhere in their old land to raise sheep because of the famine, so they decided to come mooch off their brother for a while. As predicted, Pharaoh put them to work watching over his cattle, and they were given plots of land in Goshen.
Meanwhile, the famine was getting steadily worse, and Joseph figured the time was right to turn the screws a little more on the Egyptians who, as you may recall from earlier chapters, had provided the stores of grain Joseph had been re-selling to them all this time. When the people ran out of money to buy grain, Joseph told them he would trade grain for cattle. So, the people traded every animal they had in exchange for grain, until Pharaoh (through Joseph) owned basically all of the worthwhile animals in Egypt. But still the famine continued, so Joseph told the Egyptians he would give them grain in exchange for their land. Since they were starving and therefore in no particular position to negotiate, the Egyptians sold their land to Joseph in exchange for grain until all of the land in Egypt, except for that belonging to the priests, ended up being owned by Pharaoh. Joseph’s goons then proceeded to move most of the Egyptians into the cities, while the rest became tenant farmers on Pharaoh’s new lands. To add insult to injury, Joseph further demanded that from now on, everyone would give Pharaoh 20% of their income in exchange for the privilege of living on Pharaoh’s land. Thus did Joseph use the famine to take all of the Egyptians’ shit and give it all to Pharaoh.
Of course, meanwhile Jacob’s family was being taken care of by Joseph, and they became very wealthy. Jacob lived to be 147 years old (seriously, why did God even bother making the 120-year lifespan rule if he was just going to keep breaking it?), and the time came for him to die. So, he called Joseph to his deathbed and asked that he be buried anywhere else but Egypt. Joseph agreed to bury Jacob back in Canaan, and Jacob laid back down, satisfied that his corpse would be taken care of.