Her boss really 'gave her the shaft' [=treated her unfairly] when he promoted someone less experienced instead of her.
He got promoted and she 'got the shaft'.
You really 'got shafted' in that deal.
(..) But you know what? This makes me look good, which makes the show look good... ...which makes the writers look good. So how could they be mad? I fall down an elevator shaft? What does this mean? I fall down an elevator shaft? I don't know. I just bring the scripts. They can't kill me! (..)1996 TvShow: Friends Title: The One Where Dr. Ramoray Dies Season: 2 Episode 18