She didn't write Loca though. She worked with El Cata & reworked his version of the song which already existed (she also reworked versions of his other songs Rabiosa & Addicted To You on the same album), even the lyrics are pretty much the same with a few words changed to match the male/female back & forth verses.
Here's El Cata's version (he's featured on the Spanish Shakira version by the way)...
https://www.youtube.com/watch?v=pfLZchWHKCk
This lawsuit is ridiculous since El Cata had previously 'stolen' the song years before & she just came up with her own adaptation of the song (she changed a few lyrics/added synthesizers/etc).
Here's El Cata's version of Rabiosa (which Shakira also reworked/collaborated with him on)...
https://www.youtube.com/watch?v=MKzrxKZIePw
As well as his original version of Addicted To You called Adicto A Ti (this one Shakira completely changed/wrote new lyrics for)...
https://www.youtube.com/watch?v=4km9jlXhmKI
Just another person trying to make money of off Shakira's name/fame/fortune.