As part of the deal, she accepted the charges and a fine of 50 per cent of the amount owed, more than €7.3 million ($A12.2 million).
The judge said she also accepted another fine of €438,000 ($A734,000) to avoid a three-year prison sentence during the trial's first hearing.
Previously, the Hips Don't Lie singer, who also has a second tax fraud investigation pending with Spanish authorities, vowed to fight false accusations.
The prosecutor's office was seeking an up to eight-year prison term and to claim back the taxes it says she owes.
It alleged that Shakira spent more than half of each of the years in question in Spain and was, therefore, ordinarily resident in the country.
It also said that a Barcelona property she bought in May 2012 served as a family home.
Shakira, 46, lived with former Barcelona and Spain footballer Gerard Pique for 11 years, and the couple has two children.
"This decision to reach a deal responds to personal, emotional and sentimental reasons that have nothing to do with legal (reasons)," Shakira said in a statement.
"I have reached the conclusion that winning is not a victory if the price is that they rob you of so many years of your life."