I don't want to take a shift for a coworker because of how my boss asked me
What is wrong with the way that your boss asked you?
I don't want to follow orders from someone who was rude to me
It's understandable to want to be asked something in a respectful manner, but its rude not to support fellow co-workers. They may have something urgent that needs attending to and may stress out if their work isn't left in capable hands.
Whatever, I'll just stab them in the back later.
It's understandable that you are upset with your boss but you shouldn't take it out on your coworker. Being a support to your coworker by covering their shift is a very considerate and thoughtful thing to do.