griffe

that is a good question you asked. i'm glad you stuck out your neck a bit to see what kind of answers you'd get.
being a friend...first of all it sounds like to me you have a low self image that gets in your way. of course you have things of value to offer to a friendship. you just need to find out what they are! do u care about others when they are feeling down? do you enjoy doing nice things for other people? what interests do you have? sports, history, cars, hiking, music,etc.
so i believe you
could do a list of things about yourself...things you like about yourself. that may be challenging cause you think so little of your "self" but you will find qualities if you look and be honest with yourself. before you will know how to learn to be a good friend you will need to learn how to be a good friend to
yourself.
being a good friend...caring, sharing, listening to others, being there when they're up and when they're down, being interested in their life not just yours. these are a few that come to mind about how we can be a good friend to someone. there are many others. but the key for you is for you to learn to like yourself first. then the rest will follow.

as far as your shyness goes...everybody is different so don't be hard on yourself about this. some of it may be because you are unsure of yourself. that is part of the journey...knowing who you are first.
good luck and keep us posted. do that list!!! it will help you, i promise.