"Guapa", in its more common sense, means "pretty", beautiful" and it is indeed used as a compliment. As such, it can be used in several ways.
- It can be used in a friendly way. I myself use it with my female friends now and then just to cheer them up, especially when first greeting them:
(FRIEND)—¡Hola walen! Dile a tu mujer que ayer se dejó aquí el chaquetón. (ME)—¡Hola guapa! Claro, se lo diré. ¡Gracias!
(FRIEND)—Hi walen! Tell your wife she left her coat here yesterday. (ME)—Hi pretty! Sure, I'll tell her. Thanks!
In this sense, it is maybe akin to "honey", as in "Hi honey!", though I'm not sure if that's considered "friendly" either in e.g. US culture.
- It can be used in a neutral way, i.e. literally tell someone that she is beautiful:
—¿Qué tal me queda este vestido? —Muy bien, estás muy guapa.
—How do I look in this dress? —Very good, you look beautiful.
—No sé si pasaré la audición. —Seguro que sí: eres guapa, cantas realmente bien... Se pelearán por ti.
— I don't know if I'll pass the audition. —Sure you'll do: you're beautiful, you sing really good... They'll fight over you.
(Notice that we say "estás guapa" to mean someone looks beautiful, or "eres guapa" to mean someone is beautiful.)
- And of course, it can be used to hit on someone:
—¡Hola! ¿Qué hace una chica tan guapa aquí sola?
—Hi! What's such a beautiful girl doing here all alone?
—Ayer estabas muy guapa, no se me va tu imagen de la cabeza.
—You looked very beautiful last night, I can't get your image out of my head.
So, to answer your question: yes, "guapa" can be used in a friendly way, but that is not the only way it is used.
Sadly, the intention behind a compliment is kind of outside the scope of this forum.