Udinese raced into a 3-0 lead in 40 minutes with goals from Danilo, Lopez - from his first penalty - and Kevin Lasagna before Alberto Cerri pulled one back on the stroke of half-time.
Lopez made it 4-1 early in the second half before goals from Raffaele Bianco and Mattia Mustaccchio pulled it back to 4-3 just after the hour.
Udinese averted possible disaster with two more from Lopez, including another penalty, in an eight-minute spell before Svante Ingelsson and Jakub Jankto put the finishing touches to their first win under new coach Massimo Oddo.
Lopez, 33, is at his sixth Italian club having played for Catania, AC Milan, Sampdoria, Chievo and Torino. He also played for River Plate in his homeland, Barcelona and Real Mallorca, FC Moscow and Brazilian side Gremio.