To make some environmental variable available in KDE you should export it during KDE initialization. To do this you can:
#!/bin/sh # my_var_init.sh export MY_VAR=my_value
~/.kde/env/ # or ~/.kde4/env/ # or something similar
If you absolutely do not know, where to put you script, then go to
"System settings -> Startup and Shutdown -> Autostart" and add path to it.