I was very affectionate so I gave my student a back rub
Are you serious? Why would you give them a back rub?
I was feeling good about helping them
It is wrong to be affectionate with your students. You could be accused of horrible things and be fired if other people find out.
C'mon, it's not a bad thing, I did it to help her.
I know you meant well, but you should never touch your students like that in any circumstances.