DC acquired Captain Marvel and the Fawcett Comics characters in 1972. Citing Wikipedia"
"In 1972 DC licensed — and in 1994, purchased — Captain Marvel and his related characters. Because of Marvel's trademark [to "Captain Marvel"], DC has instead used the trademark Shazam! as the title of their Captain Marvel-related comic books and thus the name under which they market and promote the character. In 1973, Shazam and the Marvel family became an additional Earth (to the Pre-Crisis DC continuity), known for a period of time as Earth-S."
Outside of the Marvel Family, these heroes rarely appeared in groups. Fawcett published many super-heroes but most of them have never appeared in a DC Comic. Six of them appeared once in a team-up in pre-Crisis times (Justice League of America #135-136, 176). At DC, all Fawcett characters were said to live on a parallel Earth, Earth-S.
In post-Crisis continuity, three more of them made cameos in the Power of Shazam! series. The post-Crisis DC universe was a unified timeline, so all these heroes co-existed with DC's on the same Earth.
To read more information about the DC/Fawcett war and DC's acquisition of the properties, check out: