The magic of ksh. You can just embed you sqlplus command inside some forward quotes and bingo, your variable is set.
THE_VALUE=`sqlplus -s system/manager <<EOF
set feedback off
set echo off
set pages 0
dbms_output.put_line(ODSLOAD.FUNC_EXTRACT_TRAILER ( 1 ));
# end of ksh
This way, you can check the value of $? to see of the sqlplus command was successful and also get your value back.