If you're attending...
Prepare some money. Up to you how much you want to give. $20, $30, $50 or $100. Put in white envelope and write your name outside the envelope. When you reach the funeral parlour, tell whoever who met you you would like to give the "peh-kim".
Don't wear red and other bright colours. You don't have to remove your jewellery or make-up.
You'll normally be brought to the altar. If you wish, you may offer incense (joss sticks). If your religion forbids it (like mine), decline the joss sticks and just stand in front of the altar for a moment. You may be brought closer to the coffin for a look. Don't decline that.
You will be invited to sit at a table. Spend some time there talking with your friend. Leave when you want to. There's no compulsion to stay. Some said you shouldn't inform your friend that you're leaving, that you should leave quietly, but that's not a hard-and-fast rule.
You may be given a red thread (for good luck/protection). Most accept the red thread as a form of custom, but it's up to you. Just don't make a big fuss about it.
If you're not attending:
You may send a wreath to the funeral parlour. The florist should be able to advise what to put on the notice.
Or you can just send a simple condolences card. I'm not sure abt including money at this point. I guess it really depends on how close you are to your friend.