I would make an appearance, even if the family doesn't like me at all, I would still like to pay my respect to that friend that just passed away. But if I knew they didn't like me, I would just try to stay in the back, and make sure they dont see me. Then leave when it's over.
I was told that funerals are for the living. It's supposed to comfort the grieving family left and that if your presence does the opposite thing, then better pay your respects in another form. However, even if that is the case, I'm part of the "living" that needs comfort and closure, not just the family, and I probably would regret it if I didn't go see my friend when I could (even if it's just a dead body).
I'd go, because I care. and I'd hope that the family could understand that much. They don't have to like me, no one does. There are many ways to say good-bye, and I can say it in private and there. But at the very least, the family can't say I never cared about their child/parents/whatever. It's not my fault (generally) if someone doesn't like me for me. What matters to me is the person that I considered friend did or does.