In this paper, we propose a grouping strategy to enhance the learning and testing results of students, called Pairing Strategy (PS). The proposed method stems from the need of interactivity and the desire of cooperation in cooperative learning. Based on the social networks of students, PS provides members of the groups to learn from or mimic learners who have good relationships with them. As such, the learning achievement can be raised. Our experimental results show that the proposed method can provide a better learning result, especially when compared to grouping at random, because it enables low achievers to find more appropriate collaborators. More precisely, the experimental results show that the learning achievement of approximately 17.64% of the students is increased. The average score is increased from 79 to 91.9 while the standard deviation is decreased from 16.9 to 13.6.