In 1987, DC published a four-part mini-series rebooting Captain Marvel for the eighties. Readers of the Crisis of Infinite Earths were asked to discretely ignore one or two panels in issue 12 of that maxi-series which would otherwise indicate that Captain Marvel survived the Crisis intact.
Instead, DC started from scratch, with Billy's meeting with SHAZAM and subsequent adventures. There were a number of changes made to the story, compared to the original, designed to tighten the relationship between some of the characters and to make the origin seem more plausible. Billy lived in San Francisco, instead of the mythical Fawcett City. Although Billy finds SHAZAM in an abandoned subway tunnel, the magical train featured in the Fawcett origin is missing. Both Dudley and Sivana are Billy's uncles, making Magnificus and Beautia Sivana Billy's cousins. Most significantly, Billy retained his own personality when transformed into Captain Marvel. Unlike previous incarnations of the character, this meant that readers got to see a child adjusting to life as an adult super-hero.
In the mini-series, it is revealed that Sivana engineered the death of Billy's parents, in order to use the insurance money to fund his scientific experiments. His experiments result in Black Adam's release from his dimensional prison, where he had been banished by SHAZAM. Captain Marvel eventually defeats both villains. In both cases, he transforms into Billy, in order to save the day.
The Legends mini-series also featured Captain Marvel prominently, as Darkseid attempted to turn the world against it's heroes. Billy, for a time, foreswears the use of his powers, believing his lightning was instrumental in someone's death, even if it was one of Darkseid's creatures. Billy is reminded of his obligation to the heroic ideal by a girl his own age.
It is after Legends that Captain Marvel works, for a time, with the fledgling Justice League International. Cap works with the team until they achieve UN recognition, before retiring from the team.