This is undoubtedly true in my experience.
If the shared interest is goal orientated, like a team sport competition, or rehearsing toward a performance with an amateur theater group, then friendships are more likely to develop than not.
Also, if you are open to letting other people teach you stuff. ie: New skills, facts, or viewpoints -- they will tend to hold a favourable opinion of you, and it makes the whole process a breeze.