She's biting for a reason, and she's trying to tell you something. Is she afraid? Does she not like what you are asking? Does she not understand what you are asking?
*WHY* is she biting?
That is what you need to figure out. Once you can figure out why, you can try and prevent her from biting. Ignoring the bite as she mauls your hands isn't necessarily teaching her to bite, it's teaching her that regardless of what she says to you, you are ignoring her.
If you pay attention to a birds body language then you should be able to pick up on the subtle signs of when they are going to bite, and thus avoid getting bitten. Here's a video that really shows an uncomfortable grey, and if this bird wasn't so friendly, the owner would be in the hospital with stitches!
[ame=http://www.youtube.com/watch?v=lr4QrTLKzjw]Parrot Training, Bird taming: What not to do - and helpful Tips - YouTube[/ame]
She usually tries to jump on my shoulder or head and I proceed to try and gently get her back on my hand. After a while she'll just attack me
Is she possibly getting bored and biting out of boredom? Is something within the environment startling her? Or is she just upset that you keep removing her from your shoulder?
Obviously, she finds your shoulder a rewarding place to be. If you don't want her on your shoulder then you need to make it more rewarding for her *not* to be on your shoulder. Provide her with treats, toys, food, cleaned bottle caps, empty pill bottles (you can always fill up with treats, food, wooden beads, etc!), etc! Make it more fun for her to be off your shoulder!
Other times we'll just be sitting and watching something peacefully, and then she'll start biting.
Same as above. Bored? Startled? You may be fine just having her sit with you, but she has an active mind like a child. Many parrots do not do well with just 'sitting around', they often are off exploring, getting into things, playing with things, especially things they shouldn't be!
When you have her with you, give her something to do! Teach her how to forage! Give her foraging opportunities! Teach her new behaviors such as turn around, shake hands, wave, shake feathers/big feathers, big wings, pick an object up, pick an object up and place it somewhere specifically, etc.
She's probably thinking "Hey! I'm bored... I don't know what to do... oh well, I'll just bite you! This makes things happen!"
Finally she's started to bite when I try to put her back in her cage for biting.
Probably because she doesn't want to go back to her cage. Parrots are social animals and the cage isn't exactly a social place. You may try placing her at her cage throughout various times in the day but don't put her in the cage, place her in the cage but don't close the door, place her in the cage, close the door, then immediately open it right back up, place her in other areas besides her cage (playgym? perch? chair? table?) - don't always place her at her cage. Maybe one time it's the cage, another time it's a perch/chair, the next time may be her cage, the time after that her playgym, after the playgym it's the couch, then the cage again, then the table, etc. Teach her that when you go and pick her up that she's not always going to her cage!
When you *DO* take her to her cage, give her a little treat, a foraging item, or perhaps a favorite toy that she enjoys but only gets when she goes to her cage! Again, make it a rewarding experience to go back to her cage!
And most of all -AVOID THE BITE-!!!! I know, easier said than done, but it requires really learning to read and understand her. Learning to know her moods so you can predict her behaviors before they occur. The better the two of you learn how to communicate with each other the better relationship that you will have!