How to debug new shortcode? And how to get string from shortcode into code?

To run this code to test it you can use the wp-cli tool with the eval-file command. wp-cli eval-file loads up the whole WordPress infrastructure then runs your PHP file so you can use WordPress calls like wp_remote_request without having to put this code in a page or pulgin. E.g. write a file called test.php that instantiates the class and calls the methods, then run that with:

wp-cli eval-file test.php

I see that @rudtek has answered how to get the data from the shortcode into your code.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)