2
Paying the ticket is why it shows up.
The cop should have told you to get the inspection sticker done, contest the ticket and bring proof that you got the issue taken care of to the hearing. Most times, not a 100% guarantee, the magistrate when presented with the proof that you have rectified the issue will find you not responsible for the ticket and it will therefore not hit your record. Some people refer to these as fix-it tickets.
Sucks you were presented incorrect instructions.