Confused by the amount of judgement here, coming from a traditional western way of thinking about relationships. No doubt you should be faithful to your girlfriend if this is the agreement you've both entered.
The reason why you feel shy talking to pretty girls, but don't feel shy when talking to someone you're not attracted to, is the intention behind the interaction. I believe charm is indeed a social skill, because I've mastered it even though I grew up not attractive and very introverted. Parts-work has helped as in some social situations I can ask for a fragment of my ego to step in and help. In my core I'm still an introvert, but can manifest a side of me that is a sexy confident woman when needed. Celebrate all parts of you.
One thought process that helped me when starting to practise social skills was whenever I felt shyness creeping in, I would flip it around and think "this insecurity that I'm feeling is just this person's insecurity mirrored into me, so I'm going to make them feel as comfortable as I can so they'll feel more secure" and that actually really works. Good looking people have a lot of insecurities as well, remember that! Be kind to it and you'll feel more in power and easy to be around