The restoring force , acts opposite to the applied force.
The spring constant , is always positive to support the fact that it will oppose the applied external force.
If the spring constant is to be negative it will imply that if you compressed a spring even slightly it would then compress itself further, which is not possible physically.