He started his career with Banfield in Argentina before moving on to Velez Sarsfield, where he scored 17 goals in 24 matches which earned him the switch to Shakhtar.
Ferreyra told Newcastle’s official website: "I am very pleased to sign for Newcastle United. I like the Premier League and when I knew that Newcastle were interested in me, it was a very easy decision to make.
"I spoke to my friend Fabricio Coloccini and when he told me about the club, I didn’t need to think twice."
Newcastle manager Alan Pardew added: "Facundo is someone we know on a number of levels, including his friendship with Fabricio, and we think he could be a big success here at Newcastle.
"This is a player who has played at the top level and is highly regarded in Argentina.
"He has tremendous potential and hopefully he can realize that here at Newcastle United."
Ferreyra is Newcastle’s seventh signing of the summer following the arrivals of Siem de Jong, Emmanuel Riviere, Remy Cabella, Ayoze Perez, Daryl Janmaat and Jack Colback.