When using industrial robots, the desire for autonomous operation often prevails, but its implementation is technically very difficult - if at all - and in most cases not economical. For this reason, it is assumed that humans and robots will continue to work together in the industrial environment in the coming years, with human-robot collaboration (HRC) being specifically considered in this thesis. Here, humans and robots work in direct contact and there are dependencies between them in the individual activities. Since in the past there has often been too much focus on technical factors, especially safety, this work will use the sociotechnical systems (STS) approach to focus on ergonomics from the outset and thus use the robot to support the human and not the other way around. To this end, a methodology is presented that is inspired by a method from the field of STS for task allocation for collaborations and combines other methods from the field of STS within it. The resulting methodology is called ErgoBot. This includes requirements analysis, description of human and robot, formation of an overall view of the system over five levels of abstraction, sequencing of the individual activities of the MRK, and a final analysis of the feasibility of the individual activities and the occupancy of the available manipulators. As a result of the ErgoBot methodology, a sequence for the processing of a task by an MRK is obtained. For the analysis of the feasibility and the occupancy of the manipulators a visualization was developed, which is particularly helpful to determine iteratively the optimal sequence in which the human being carries out only those work steps, which are ergonomically meaningful for him. To validate the methodology, a user study was conducted, in which two sequences were compared against each other: The same task was implemented according to the ErgoBot methodology and according to a conventional method. The evaluation showed a tendency towards increased ergonomics after evaluation using different instruments. The methodology was both scientifically investigated and designed to be easily applied in practice in order to promote a stronger focus on ergonomics in HRC and to support corresponding implementations in practice.