You can just append it on to the end of
file2.txt by doing
ls -a | grep text1 >> file2.txt
Or if you want it in a different file
ls -a | grep text1 > output.txt
cat file2.txt >> output.txt
If you want the stderr instead of stdout
ls -a | grep text1 2>> output.txt
Note that this probably won't put anything in your file since
ls -a is unlikely to output anything to stderr.
EDIT: If you want to pipe the results to another program instead of redirecting to a file you'll probably want to use named pipes.
cat pipe1 | next program &
ls -a | grep text1 >> pipe1
cat file2.txt >> pipe1