The 24-year-old defender has been with the Spanish club for two seasons, making 64 league appearances. He began his senior career by coming through the academy at Everton before spending two years with Sampdoria in Serie A.
Shkodran, who is currently on international duty with Germany, becomes Arsenal’s sixth signing of the summer. Lucas Perez, Granit Xhaka, and the young trio of Rob Holding, Takuma Asano and Kelechi Nwakali have all recently joined.
Arsene Wenger told the club’s official website: “He is at the right age. He has good experience. He is a very focused player who can play with the ball as well. We have taken a great player but have prepared well for the future.”