It sounds like your problem is that you don't understand how references work in unity yet. Read more about it here to get started (and upvote any answers which help!).
Assuming you've read that, you should now understand that you need a reference to the instance of that script which is on the gameobject, rather than a reference to the script itself.
So your script is called "shift"? (It's convention to name scripts and functions with an initial upper case letter, so rename your script, and I'll continue with it as "Shift").
In that case, you either need to create a public variable whose type is "Shift", which will create a visible slot in the inspector, and drag your gameobject into that slot:
var shiftInstance : Shift;
Or, create a private variable whose type is "Shift" (which won't show up in the inspector), and do a "GetComponent" in your object's Start() or Awake() function which grabs the reference:
private var shiftInstance;
function Start() {
shiftInstance = GetComponent(Shift);
}
Once you've done either of these, your "shiftInstance" variable now contains a reference to the instance of the "Shift" script which you placed on the gameobject, and you should then be able to access the variables on it, for example:
shiftInstance.w
Hope this helps clarify things!