'Er died for his wickedness, and left no children . It was of their culture that if a man died, leaving no children, his brother would have to produce children through the dead man's wife for him. 'Onan refused to do this, and died because God saw this as wicked . At this time, Shelah was too young to fulfill his duties as a brother, so Yehudah deceptively told his daughter-in-law, Tamar, to live as a widow in her father's house until Shelah grew up. He thought Shelah may die too, but didn't want that to happen.
(For a fuller list of Shelah's descendants, see the Tribe of Judah)