If you want to live, you've got to be polite and respectful to cops and should only do as instructed. You may reach for the glove compartment well before the officer arrives to the window to collect your documents, being a good citizen, but you may get shot for reaching for a gun. So don't do anything the officer hasn't told you to do. Rather argue the case in court and possibly get money out of it than be buried 6 feet under.
You could've been shot by the officer when you reached for your back and he would've easily been pardoned because he would claim he assumed you were trying to pull a gun, coupled with the fact that he was responding to a female overdose on heroin.