Does it look bad if you take an AP exam before the class?

Sounds like that decision has been made. And that OP feels he knows this material. The 5 will be helpful for placement, likely not admission.