Carlos Sainz received a five-second time penalty at the Spanish Grand Prix after causing a collision with Fernando Alonso.