The integration of biomimetic robots in a fish school may enable a better understanding of collective behaviour, offering a new experimental method to test group feedback in response to behavioural modulations of its 'engineered' member. Here, we analyse a robotic fish and individual golden shiners (Notemigonus crysoleucas) swimming together in a water tunnel at different flow velocities. We determine the positional preference of fish with respect to the robot, and we study the flow structure using a digital particle image velocimetry system. We find that biomimetic locomotion is a determinant of fish preference as fish are more attracted towards the robot when its tail is beating rather than when it is statically immersed in the water as a 'dummy'. At specific conditions, the fish hold station behind the robot, which may be due to the hydrodynamic advantage obtained by swimming in the robot's wake. This work makes a compelling case for the need of biomimetic locomotion in promoting robot-animal interactions and it strengthens the hypothesis that biomimetic robots can be used to study and modulate collective animal behaviour.