Besides sed you can also do this with awk:
awk '1; /line 2/ { while(getline < "file2.txt") print }' file1.txt
This will insert the contents of file2.txt every time line 2 is encountered.
The 1 is the default block { print $0 }.
This sends its output to standard output, if you want to overwrite file1.txt save the output to a temporary file and overwrite:
awk '1; /line 2/ { while(getline < "file2.txt") print }' file1.txt > file1.txt.tmp
mv file1.txt.tmp file1.txt
Edit
For fixed string matching == would be more reliable, e.g. to match the mentioned string use this conditional:
awk '1; $0 == "\"zend_extension=/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so\"" { while(getline < "file2.txt") print }' file1.txt
Note this needs to match the whole line.