Yes, of course the story of Pygmalion from the Greek mythology, i.e.,falling in love with his own creation -the ivory statue has inspired G.B Shaw's play 'Pygmalion: A romance in five acts.' As we know that Shaw used to write about women who had self-respect and and a head of their own to know their emotions, choices and sentiments, e.g., Candida and other plays. They don't have to depend upon men to decide their fate, instead they themselves are sufficient and intelligent enough to take a stand on their own in a dignified and graceful manner.
So,I feel Shaw's play is similar to the myth when Mr. Higgins and Pickering choose to train Eliza-the flower girl with a heavy cockney accent in her language, with the mannerisms of a lady. And, at the end,after doing this job successfully, Higgins wishes her to marry him. So, here there is a similarity with the myth-if we take the flower girl metamorphosed into a perfect lady by the phonetician Higgins as his creation, and then a wish to take her as his wife , i.e., falling in love with his own work/creation.
But, at the same time this play differs also largely from the myth in the way that Eliza is a living modern woman with an independent personality,hre own choices,ceratin ego and self-respect. She knows what she wants and refuses Higgin's marriage proposal and marries Freddy. Thus, Shaw differs from the myth as he has not considered an inanimate object (statue in the myth) but a living flower girl. Another instance of difference is that he has used mundane and day to day life activities to make the play sound realistic to audience. The play opens with a dark rainy night with people who have taken shelter under the roof of a church. So, its somewhat more realistic and near to pactical life when compared to the original myth.
So,the play is more a satire on the rigid British class system of that day and a comment on women's independence which is packaged as a romantic comedy.