Yes you could get in legal or civil trouble if you inject someone with an epi-pen that is not theirs (after all you could actually kill someone with one), unless you are medically trained and in your field of expertise. That being said I would not hesitate to use one (since I have them on hand, due to an allergy) if the situation warranted it, because the choice could to risk the legal trouble or watch them die. It is also much less expensive to keep a vial of epinephrine and a syringe (like the old fashioned allergy kits) but you must know the dosages to use. The problem is that in anaphylactic shock epinephrin will only be effective for about 15-20 minutes and than the reaction continues. You need to get medical help within that time frame, or have another option until you can get medical treatment, this may be a second dose of epinephrine or a longer acting antihistamine such as diphenhydramine (Benadryl). It is best to have it in an injectable form, but in a pinch can be given sublingualy. If I were not (or a family member) was not allergic I do not think I would bother to have anything more than some Benadryl on hand, as the risk of a problem is very low.
"What we obtain too cheap, we esteem too lightly: it is dearness only that gives every thing its value." Thomas Paine