Pass parameter to hooked function using custom page template

you make a mistake in the call of add_action
the last parameters must be changed from 1 to 2

add_action('pre_get_posts','shop_filter_cat',10,2);

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