Do not ring the doorbell when visiting a family sitting shiva. Mourners should not be prompted to act as hosts. The door will likely be unlocked. Just walk in. If the door is locked; knock lightly, or consider that they may not be open to visitors at that time.
If there are a lot of visitors, try not to stay too long. The shiva home should not become crowded, nor should it be treated as a social function.
Upon entering the shiva home, it’s sometimes customary to take your shoes off (not every community does this,) and keep your voice low and soft. Simply sit with the mourners, and let them set the tone.
Avoid asking how they’re doing. You already know the answer, and they shouldn’t be made to feel the need to pretend they’re okay.
Do not bring flowers; symbols of life are an affront to both the mourning and the deceased. Instead, bring gifts of kosher food. They don’t have to be homemade; store-bought is fine. Also do not bring wine or other types of alcohol; mourners are not to drink during shiva. (Gifts are Ashkenazic; Among Sephardim, visitors do not usually bring gifts.)
Donate (if you can) to a charity or cause the deceased cared about. If you’re unsure of what that might be, ask the family. They may already have a donation fund set up.
Plant a tree in honor of the deceased. There are many websites where you can have a memorial tree planted in almost any location in the world, and they often also send a notification card or email to the family.