It could work to a certain extent. Would it work like the movie? No. Movies don't dig deep into the complexities of human emotions. People put on masks and pretend to be someone they are not often in real life. We all have done it more or less. They eventually get tired of their fake persona and reveal their true selves to their partners. So could a girl get fooled into falling for a person who is faking a confident personality? Totally! But either the guy would change over time or he would become who he was. Unless the girl evolves with his personality changes and accepts them she would most likely leave him.
If you are talking about a scenario identical to the movie where the guy basically tricks the girl into a believing he is a completely different person then that would be betrayal and the girl would most likely dump his ass the second she finds out. I am sure there are exceptions who might see it as a grand romantic gesture.

4