Three steps involved in this, 1. adding your settings script into global setup script 2. assign that to module typoscript. 3. Access it from your controller variable.

Step 1:

Add your typoscript settings script in Template->setup or extension’s typoscript file ext_typoscript_setup.txt with the extension key. ie plugin.tx_myplugin.settings

Typoscript

plugin.tx_myplugin.settings {
 my_page_id = 123
}

Step 2:

And now you need one more thing in typoscript, ie assign the plugin settings to your module script.
Typoscript

module.tx_myplugin {
	settings < plugin.tx_myplugin.settings
}

Step 3:

Ok, all your typoscript works are over. Lets try some PHP script to fetch the values in your extbase controller or hook script. Just use this operator to get the settings values.

PHP


public function yourAction() {
 echo $this->settings['my_page_id']; // print 123
}