This paper applies the theory of social networks to P2P systems, creating a social-network-based P2P network topology formation algorithm for file sharing. The algorithm extends the Gnutella P2P file sharing technology, which uses super nodes for searching and for relaying shared files between network leafs that are located behind Firewalls/NATs. The topology of the P2P network is based on the actual social relationship between peers (users). The idea is that users are willing to contribute their resources to a P2P network if they know that their resources directly benefit their friends and family. Following this approach, free-riding in P2P networks will be avoided by not providing better-than-basic service if peers do not reveal their social relationships. Within the paper, we simulate the proposed topology formation algorithm, considering the real characteristics of the Gnutella P2P network and realistic network topologies. The simulation shows the effectiveness of the topology formation algorithm and the high utility of nodes under this new file sharing scheme.