The universal opener...
What kind of opener can I use on a girl who is on her way out of class while I am on my way into class?
How about, "Hi."...
Seriously, it doesn't really matter what you say, as much as how you say it. Be desireless, be calm, be you. This girl may or may not be interested, but make sure you're not projecting any of your interest onto her actions.
That said, start off by using the context. Ask her a question about her class ("how was it?", maybe?). Keep her engaged in conversation for at least minute, so that you have her full attention. As you're at the class changeover, you maybe have only a couple more minutes, so as soon as the conversation is rolling guide her away from the context. Ask her if she is taking any other classes. Ask her what other activities she enjoys? Ask her if she's single!
Don't worry about number closing at this point. If it feels right, by all means go for it, but don't get hung up over it. Establish a connection, some rapport. You're going to see her again (probably) at the next class, so don't worry about getting it all in.
One final point: make sure it's YOU that ends the conversation. Should be pretty easy to do, you're on way into class, whereas she's got time to spare!
Have fun, let me know how it goes.
She also has a friend who is very hot but she seems like a CB.
Don't worry about the friend. Seriously. Just focus on the one chick for now. Her being hot actually works in your favour - hot chicks don't tend to ****-block, as they're not hung up over their friends hooking up. Beware the ugly friend...