1. AB5 is a law that restricts businesses from classifying workers as independent contractors, forcing companies to shift classification of these workers to employees.

2. AB5 is a law that restricts businesses from classifying workers as independent contractors, forcing companies to shift the classification of these workers to employees.
---------------------------------------------------------------------------------------
Which one is correct? Do we have to put 'the' before classification?

Both are correct. The second seems a bit better, but the first is not wrong.