WARNING: The following article contains major spoilers for Shazam!, in theaters now.

While Warner Bros. is de-emphasizing the shared universe element of its DC films, director David F. Sandberg's Shazam! places itself firmly within the DC Extended Universe. As such, it's full of references to the franchise's other heroes, most notably Superman.

It's not difficult to understand why. After all, Superman and Shazam are essentially mirror images of one another. In fact, Shazam (then known as Captain Marvel) was created as a direct response to Superman, and at the peak of his popularity, outsold the comic book adventures of the Man of Steel.

RELATED: Zachary Levi's Shazam Should Be the Face of the DCEU

It's true that Shazam originally took his cues from Superman. However, what likely no one saw coming was that when the former Captain Marvel returned to the big screen for the first time in 78 years, he would teach Superman a thing or two about staying true to the tone of the source material.

In addition to numerous shout-outs to the character, Shazam!'s closing moments feature a cameo by Superman. And while he's only on screen for a few moments -- we don't even see his face -- this version of the ironic hero is nevertheless the more faithful to the comics than of his previous appearances in the DCEU.

But how can that be? It all comes down to what he's doing in those few seconds.

It's no secret the DCEU struggled to effectively and accurately portray Superman from its retroactive beginning, in 2013's Man of Steel, due in large part to who oversaw the character. Regardless of your opinion of director Zack Snyder, there's little denying his dark depiction of Superman clashes with the traditional image of quintessential superhero. Superman is hope, a beacon of idealism. He's what we should strive to be. Yet, he spends much of Snyder's DC movies either recklessly causing destruction or wallowing in his own misery; he's hardly a source of inspiration.

RELATED: Shazam! Literally Opens the Door for a Justice League Dark Movie

Simply put, that's why films like Man of Steel and Batman v Superman: Dawn of Justice do the character such a disservice. He cannot be the symbol of hope if he's barely permitted to crack a smile. Justice League got partway there, but even then, the character spent a good chunk of his time skulking (and when he did smile, it was marred by horrible, mustache-disguising CGI.)

What is he doing in Shazam! then? He's taking the time out of his busy schedule to help out a fellow superhero, and make the day of a young fan, Freddy Freeman, during his lunch period at school. Naturally, Freddy is awestruck, and he's not the only one. Every student in the cafeteria is in a state of utter amazement at the sight of the Superman, in the flesh.

Call Man of Steel genius all you want, but the fact of the matter is that Superman carrying his lunch tray -- complete with sandwich and milk -- while on his way to meet a frequently bullied fan is the single-most Superman thing that Superman has done in the entire DCEU. And it goes to show that Sandberg seems to understand the core tenets of Superman that Snyder couldn't.

RELATED: How Shazam! Cements Itself in the DCEU... Sort of

Interestingly enough, however, Sandberg didn't need to include a physical cameo to showcase his improved vision of the iconic hero. Freddy actually conveys it well on his own, largely because his perception of Superman is exactly what everyone's should be.

Despite his circumstances, as a disabled child in foster care, the mere fact that Superman exists gives him something to smile about. He collects Man of Steel memorabilia, researches the hero's exploits, and proudly wears his Superman backpack to school. Why? Because he knows that, no matter what happens, as long as Superman is around, then maybe everything really is going to be OK.

Still, that Superman did turn up in Shazam! was a welcome development, and perfectly drives home the point He isn't a weapon of mass destruction,  a sullen recluse, or a "false god." He's a guy who wants to do the right thing.

Furthermore, even if it was only for an instant, it was nice to see a Superman like this on the big screen for the first time in well over a decade. Granted, the character's onscreen presence hasn't solely been defined in recent years by the DCEU's doom and gloom, seeing as how we've had Tyler Hoechlin's Superman on The CW's Supergirl as an antidote.

RELATED: Shazam! Producer Explains How the Film's Big Cameo Was Intended to Go Down

Still, you have to wonder how much better Henry Cavill's tenure would have panned out if he'd been given direction by Sandberg. Because while bleak superhero tales definitely have a place in cinemas, that place is as far away from Superman as possible.

The DCEU is undeniably on the up and up now, thanks to films like Wonder Woman, Aquaman and Shazam! providing a much-needed course correction and effectively saving the franchise from the mistakes of its past. However, had Superman been allowed to act, well, like Superman from the off, the franchise may not have needed saving.

Directed by David F. Sandberg, Shazam! stars Asher Angel as Billy Batson, Zachary Levi as Shazam, Mark Strong as Dr. Thaddeus Sivana, Djimon Hounsou as the ancient wizard Shazam, Grace Fulton as Mary Bromfield, Jack Dylan Grazer as Frederick “Freddy” Freeman, Ian Chen as Eugene Choi, Jovan Armand as Pedro Peña, Faithe Herman as Darla Dudley, Cooper Andrews as Victor Vásquez and Marta Milans as Rosa Vásquez. The film is in theaters now.