Sorry to hear about your situation, but I don't see how this collision is the dealer's fault.
Normally, in a BHPH sale/financing the dealer requires full collision/comprehensive insurance coverage for the vehicle. If you dealer did not require it, and you did not seem to think it was necessary to protect you should you total the car, and still owe the balance on the loan, then that was a bad decision to save some money, but leave yourself exposed to this kind of risk. As far as the "emergency brake" not working, I doubt that you can prove that it would have prevented the rear end collision, but even if you could, most likely the car was purchased as-is with no warranty.
However, if the dealer did anything improper in selling you the car, and did not provide you with the proper documentation or disclosures, you may be able to get relief from the contract. Consult with an auto fraud attorney in your area, you can search for one on www.naca.net
I am an attorney who is only licensed in the State of Florida. My answer is general legal advice based upon what I perceive your question to be, and should not be relied upon because every person's facts and circumstances are unique, and because specific laws vary from state to state. To completely evaluate a legal issue requires reviewing and evaluating all relevant facts, applicable laws and other information. My answer does not create an attorney-client relationship, and offered for informational purposes only.
Although I understand you are frustrated, but there is very likely no apprpriate action against the dealer. Prior to purchasing any used vehicle, it is important to have an independent mechanic review the car or truck. Used vehicles are usually sold "as is" without any warranty or guarantee that it is mechanically sound. I think you can explain your story to the traffic court judge in an effort to reduce or eliminate your fine from the ticket. However, he or she may not be willing to offer you any reduction in the fine since you did not have the brakes evaluated prior to driving the vehicle. I wish I had a better solution for you, but unfortunately there is no ready solution at this time. Please be sure to report the incident to your insurance company in case the other driver files a civil suit against you. If you have insurance, then it will provide you with liability insurance against such a claim.
Sign up to receive a 3-part series of useful information and advice about personal injury law.