In fact, he wrote it; at least he is solely credited with the screenplay
and dialogue in the opening credits. His ending of the movie does leave
the field wide open for the viewer to speculate; there is no indication
of Eliza's response to Higgins' final utterance. If we presume that Shaw
wanted to essentially stick with his original epilogue, she does give
Higgins the heave-ho and return to Freddy. (BTW, why did Shaw depict
Freddy as such a braying idiot? He's almost painful to watch, especially
when seen beside Jeremy Brett's much more appealing portrayal in the
movie of MFL. I'm sure it was Shaw and not David Tree that made it that
way. But Shaw is rather beyond asking now, so whatever...)
As for the ending: yes; MFL's ending is indeed very similar to that of
the movie of Pygmalion; the chief difference is that the ambiguity isn't
there. Eliza is specifically depicted in tears after Higgins' final cut;
she has lost out at whatever she hoped for by returning and that's it.
As I see it, the ending of Shaw's play is comparatively a happy one -
but for Pygmalion, not MFL. It is in the sense that Eliza takes the
high ground, displaying confidence, poise and a real sense of personal
power. But, given the overall tone of MFL and not just the ending, I
don't see it the same way. MFL _is_ comedy in a way Pygmalion isn't:
imagine Wendy Hiller breaking into a spoken equivalent of "Just You
Wait" or the guests of Mrs. Higgins for tea staring stone-faced into the
camera in a manner similar to the "Ascot Gavotte." Obviously, such
exaggerated satire and caricature are not the same as Shaw's use of
humor; they are the stuff of literary and theatrical comedy. And there
are numerous other examples, in addition to the softening of Higgins'
treatment of Eliza during her training. That's part of the reason why I
see the two as dissimilar and, given that MFL is an adaptation of
Pygmalion rather tha...