The government has vowed to stop businesses recruiting foreign workers instead of training people already in the UK.