Within a laboratory experiment we investigate a principal-agent game in which agents may, first, self-select into a group task (GT) or an individual task (IT) and, second, choose work effort. In their choices of task and effort the agents have to consider pay contracts for both tasks as offered by the principal. The rational solution of the game implies that contract design may not induce agents to select GT and provide positive effort in GT. Furthermore it predicts equal behavior of agents with different productivities. In contrast, considerations of trust, reciprocity and cooperation - the social-emotional model of behavior - suggest that contract design can influence the agents' willingness to join groups and provide effort. We analyze the data by applying a two-step regression model (multinomial logit and tobit) and find that counter to the rational solution, contract design does influence both, task selection and effort choice. The principal can increase participation in work groups and can positively influence group performance. Larger payment increases the share of socially motivated agents in work groups. The selection effect is larger than the motivation effect.