Is it safe to wear shape up tennis shoes I notice when I wear mine my back legs ant thighs hurt?

I don't recommend it. If you continue to experience pain after allowing for a reasonable amount of time to pass to accommodate to the new shoes, I do not recommend that you continue to wear them. If you are experiencing pain, you are not likely to reap enough benefit from their use to counterbalance the downsides.
Stop. If you find a particular shoe causing pain in your legs knees ankles or feet stop using them. Get yourself checked out to make sure that there is nothing else going on.